Show anonymous votes when dead and not Guardian Angel

This commit is contained in:
D1GQ committed 2026-03-18 15:16:14 -05:00
1 parent f9de7f31db
commit 275cb6c98e
2 files changed
+25 -4

No files matched your search

+2 -4
View File
@@ -9,13 +9,11 @@
<!-- Apply Null Notation Restrictions -->
<Target Name="Il2CppRestrictions" BeforeTargets="CoreCompile" Condition="$([MSBuild]::IsOsPlatform(Windows))">
<Exec Command="powershell.exe -ExecutionPolicy Bypass -File &quot;$(MSBuildProjectDirectory)\build\Il2CppRestrictions.ps1&quot;"
IgnoreExitCode="true">
<Exec Command="powershell.exe -ExecutionPolicy Bypass -File &quot;$(MSBuildProjectDirectory)\build\Il2CppRestrictions.ps1&quot;" IgnoreExitCode="true">
<Output TaskParameter="ExitCode" PropertyName="ScriptExitCode" />
</Exec>
<Error Condition="'$(ScriptExitCode)' != '0'"
Text="Il2Cpp compatibility check failed. See errors in error list." />
<Error Condition="'$(ScriptExitCode)' != '0'" Text="Il2Cpp compatibility check failed. See errors in error list." />
</Target>
<!-- Git Commit Hash Retrieval -->
@@ -0,0 +1,23 @@
using AmongUs.GameOptions;
using BetterAmongUs.Helpers;
using HarmonyLib;
namespace BetterAmongUs.Patches.Gameplay.Options;
[HarmonyPatch]
internal static class LogicOptionsPatch
{
[HarmonyPatch(typeof(LogicOptionsNormal), nameof(LogicOptionsNormal.GetAnonymousVotes))]
[HarmonyPostfix]
private static void LogicOptionsNormal_Update_Postfix(MeetingHud __instance, ref bool __result)
{
if (PlayerControl.LocalPlayer == null)
return;
// Show anonymous votes when dead and not Guardian Angel
if (!PlayerControl.LocalPlayer.IsAlive() && !PlayerControl.LocalPlayer.Is(RoleTypes.GuardianAngel))
{
__result = false;
}
}
}