From e424692f58291b8dc52095e19d970bb9d7e4c165 Mon Sep 17 00:00:00 2001 From: Terry Hearst Date: Fri, 6 Oct 2023 20:54:57 -0400 Subject: [PATCH] Fix inAllReplays functionality --- Patches/MarbleControllerPatches.cs | 10 ++++++---- Patches/MarbleHolderPatches.cs | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Patches/MarbleControllerPatches.cs b/Patches/MarbleControllerPatches.cs index 6235d9f..b2e595d 100644 --- a/Patches/MarbleControllerPatches.cs +++ b/Patches/MarbleControllerPatches.cs @@ -58,6 +58,12 @@ namespace CustomCosmeticLoader.Patches if (!Config.enabled || Config.skinNameToHijack == "*") return; + if (Config.inAllReplays) + { + cosmetics.Skin = Config.skinNameToHijack; + return; + } + string replayName = null; GamePlayManager.Get().GetCurrentReplays(delegate (List replays) @@ -70,10 +76,6 @@ namespace CustomCosmeticLoader.Patches if (Config.otherPlayers.ContainsKey(replayName) || replayName == Player.Current.Name) cosmetics.Skin = Config.skinNameToHijack; - - // HACK - call this early so that SetMarble is aware of it - // Normally it would be called right AFTER ApplyCosmetics - __instance.AddMode(MarbleController.ReplayMode); } } } diff --git a/Patches/MarbleHolderPatches.cs b/Patches/MarbleHolderPatches.cs index adf0dca..1772e4b 100644 --- a/Patches/MarbleHolderPatches.cs +++ b/Patches/MarbleHolderPatches.cs @@ -57,7 +57,7 @@ namespace CustomCosmeticLoader.Patches } else { - if (MarbleManager.Replaying) + if (MarbleManager.Replaying && !Config.inAllReplays) { string replayName = null;