From e268b63bd72cdb8a7b9158176602c3602fac0781 Mon Sep 17 00:00:00 2001 From: Terry Hearst Date: Sat, 26 Aug 2023 22:26:13 -0400 Subject: [PATCH] Only update bestScore if it's actually better --- Patches/GamePlayManagerPatches.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Patches/GamePlayManagerPatches.cs b/Patches/GamePlayManagerPatches.cs index e020901..2963735 100644 --- a/Patches/GamePlayManagerPatches.cs +++ b/Patches/GamePlayManagerPatches.cs @@ -14,8 +14,11 @@ namespace DiamondTimeViewer.Patches if ((__instance.PlayType == PlayType.Normal || __instance.PlayType == PlayType.Ghost) && !MarbleManager.usedRewind && LevelSelect.instance != null) { - LevelSelect.instance.bestScore = marble.ElapsedTime; - LevelSelect.instance.UpdateMedals(); + if (marble.ElapsedTime < LevelSelect.instance.bestScore) + { + LevelSelect.instance.bestScore = marble.ElapsedTime; + LevelSelect.instance.UpdateMedals(); + } } } }