mirror of
https://github.com/D1GQ/BetterAmongUs.git
synced 2026-10-20 01:46:19 +00:00
Show anonymous votes when dead and not Guardian Angel
This commit is contained in:
1 parent
f9de7f31db
commit
275cb6c98e
2 files changed
+25
-4
No files matched your search
@@ -9,13 +9,11 @@
|
||||
|
||||
<!-- Apply Null Notation Restrictions -->
|
||||
<Target Name="Il2CppRestrictions" BeforeTargets="CoreCompile" Condition="$([MSBuild]::IsOsPlatform(Windows))">
|
||||
<Exec Command="powershell.exe -ExecutionPolicy Bypass -File "$(MSBuildProjectDirectory)\build\Il2CppRestrictions.ps1""
|
||||
IgnoreExitCode="true">
|
||||
<Exec Command="powershell.exe -ExecutionPolicy Bypass -File "$(MSBuildProjectDirectory)\build\Il2CppRestrictions.ps1"" 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user