From 275cb6c98ea443d289981c033189ec9bf42c8882 Mon Sep 17 00:00:00 2001 From: D1GQ Date: Wed, 18 Mar 2026 15:16:14 -0500 Subject: [PATCH] Show anonymous votes when dead and not Guardian Angel --- src/BetterAmongUs.csproj | 6 ++--- .../Gameplay/Options/LogicOptionsPatch.cs | 23 +++++++++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 src/Patches/Gameplay/Options/LogicOptionsPatch.cs diff --git a/src/BetterAmongUs.csproj b/src/BetterAmongUs.csproj index b5d2dfd..93a3370 100644 --- a/src/BetterAmongUs.csproj +++ b/src/BetterAmongUs.csproj @@ -9,13 +9,11 @@ - + - + diff --git a/src/Patches/Gameplay/Options/LogicOptionsPatch.cs b/src/Patches/Gameplay/Options/LogicOptionsPatch.cs new file mode 100644 index 0000000..3ceede2 --- /dev/null +++ b/src/Patches/Gameplay/Options/LogicOptionsPatch.cs @@ -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; + } + } +}