fix white button flashing issue

This commit is contained in:
XtraCube committed 2024-09-14 19:29:14 -04:00
1 parent faed84d0f6
commit 7471a43d39
1 file changed
+1
+1
View File
@@ -89,6 +89,7 @@ public static class HudManagerPatches
[HarmonyPatch(nameof(HudManager.SetHudActive), typeof(PlayerControl), typeof(RoleBehaviour), typeof(bool))]
public static void SetHudActivePostfix(HudManager __instance, PlayerControl localPlayer, RoleBehaviour role, bool isActive)
{
__instance.AdminButton.ToggleVisible(isActive && role.IsImpostor && GameOptionsManager.Instance.CurrentGameOptions.GameMode == AmongUs.GameOptions.GameModes.HideNSeek);
if (!localPlayer.Data)
{
return;