From d415d89070dfc88c2e7614d785fcca566a1b1c71 Mon Sep 17 00:00:00 2001 From: Pietrodjaowjao Date: Sat, 31 Oct 2026 21:54:21 -0300 Subject: [PATCH] prevent conflict with IAsyncOperation.DebugName (shared pointer) --- MiraAPI/Patches/GameModes/GameManagerPatches.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/MiraAPI/Patches/GameModes/GameManagerPatches.cs b/MiraAPI/Patches/GameModes/GameManagerPatches.cs index 4bf6ef4b..4e151263 100644 --- a/MiraAPI/Patches/GameModes/GameManagerPatches.cs +++ b/MiraAPI/Patches/GameModes/GameManagerPatches.cs @@ -20,16 +20,13 @@ internal static class GameManagerPatches return true; } - [HarmonyPrefix, HarmonyPatch(nameof(GameManager.ShowCrewmatesKilled))] - public static bool ShowCrewmatesKilledPrefix(ref bool __result) + [HarmonyPostfix, HarmonyPatch(nameof(GameManager.StartGame))] + public static void StartGamePostfix() { - if (CustomGameModeManager.ActiveMode != null) + if (CustomGameModeManager.ActiveMode != null && HudManager.InstanceExists) { - __result = CustomGameModeManager.ActiveMode is HideAndSeekMode; - return false; + HudManager.Instance.CrewmatesKilled.gameObject.SetActive(CustomGameModeManager.ActiveMode is HideAndSeekMode); } - - return true; } [HarmonyPatch(typeof(NormalGameManager), nameof(NormalGameManager.GetMapOptions))]