diff --git a/MiraAPI/GameModes/HideAndSeekMode.cs b/MiraAPI/GameModes/HideAndSeekMode.cs index d58424f..fe5cf41 100644 --- a/MiraAPI/GameModes/HideAndSeekMode.cs +++ b/MiraAPI/GameModes/HideAndSeekMode.cs @@ -243,9 +243,7 @@ public class HideAndSeekMode : AbstractGameMode public override IEnumerator IntroCutscene(IntroCutscene __instance) { - deadPlayerCount = 0; SoundManager.Instance.PlaySound(__instance.IntroStinger, false, 1f, null); - ShipStatus.Instance.BreakEmergencyButton(); Logger.GlobalInstance.Info("IntroCutscene :: CoBegin() :: Game Mode: Hide and Seek (MiraAPI)", null); __instance.LogPlayerRoleData(); __instance.HideAndSeekPanels.SetActive(true); @@ -393,6 +391,11 @@ public class HideAndSeekMode : AbstractGameMode ShipStatus.Instance.StartSFX(); UnityEngine.Object.Destroy(__instance.gameObject); } + public override void Initialize() + { + deadPlayerCount = 0; + ShipStatus.Instance.BreakEmergencyButton(); + } public override PlayerBodyTypes GetBodyType(PlayerControl player) { diff --git a/MiraAPI/Patches/IntroCutscenePatches.cs b/MiraAPI/Patches/IntroCutscenePatches.cs index 4ee990c..e0e76d8 100644 --- a/MiraAPI/Patches/IntroCutscenePatches.cs +++ b/MiraAPI/Patches/IntroCutscenePatches.cs @@ -3,6 +3,7 @@ using HarmonyLib; using Il2CppInterop.Runtime.InteropTypes; using MiraAPI.Events; using MiraAPI.Events.Vanilla.Gameplay; +using MiraAPI.GameModes; using MiraAPI.Roles; using MiraAPI.Utilities; @@ -122,6 +123,10 @@ public static class IntroCutscenePatches } Info("IntroCutscene ended"); + if (CustomGameModeManager.ActiveMode != null) + { + CustomGameModeManager.ActiveMode.Initialize(); + } MiraEventManager.InvokeEvent(new IntroEndEvent(introCutscene));