From 7a74eaa2dec61e1342e9b3c8ca3f3eed1a0ce30f Mon Sep 17 00:00:00 2001 From: Joseph Madamba Date: Sun, 21 Jan 2024 18:47:24 -0800 Subject: [PATCH] Fix star counter decrease animation being delayed when current is over displayed star count --- osu.Game/Graphics/UserInterface/StarCounter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Graphics/UserInterface/StarCounter.cs b/osu.Game/Graphics/UserInterface/StarCounter.cs index 5fdc6a4904..4e9e34d840 100644 --- a/osu.Game/Graphics/UserInterface/StarCounter.cs +++ b/osu.Game/Graphics/UserInterface/StarCounter.cs @@ -115,7 +115,7 @@ private void animate(float newValue) star.ClearTransforms(true); - double delay = Math.Max(current <= newValue ? i - current : current - 1 - i, 0) * AnimationDelay; + double delay = Math.Max(current <= newValue ? i - current : Math.Min(current, StarCount) - 1 - i, 0) * AnimationDelay; using (star.BeginDelayedSequence(delay)) star.DisplayAt(getStarScale(i, newValue));