Fix inAllReplays functionality

This commit is contained in:
Terry Hearst 2023-10-06 20:54:57 -04:00
parent 41a1e75946
commit e424692f58
2 changed files with 7 additions and 5 deletions

View file

@ -58,6 +58,12 @@ namespace CustomCosmeticLoader.Patches
if (!Config.enabled || Config.skinNameToHijack == "*") if (!Config.enabled || Config.skinNameToHijack == "*")
return; return;
if (Config.inAllReplays)
{
cosmetics.Skin = Config.skinNameToHijack;
return;
}
string replayName = null; string replayName = null;
GamePlayManager.Get().GetCurrentReplays(delegate (List<Replay> replays) GamePlayManager.Get().GetCurrentReplays(delegate (List<Replay> replays)
@ -70,10 +76,6 @@ namespace CustomCosmeticLoader.Patches
if (Config.otherPlayers.ContainsKey(replayName) || replayName == Player.Current.Name) if (Config.otherPlayers.ContainsKey(replayName) || replayName == Player.Current.Name)
cosmetics.Skin = Config.skinNameToHijack; 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);
} }
} }
} }

View file

@ -57,7 +57,7 @@ namespace CustomCosmeticLoader.Patches
} }
else else
{ {
if (MarbleManager.Replaying) if (MarbleManager.Replaying && !Config.inAllReplays)
{ {
string replayName = null; string replayName = null;