From a30c7f51d04167ae0fac9130276d4b22be05ab90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Fri, 3 Oct 2025 12:35:58 +0200 Subject: [PATCH] Fix wrong leaderboard flashing briefly when quickly changing beatmaps Closes https://github.com/ppy/osu/issues/33743. --- osu.Game/Screens/SelectV2/BeatmapLeaderboardWedge.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/osu.Game/Screens/SelectV2/BeatmapLeaderboardWedge.cs b/osu.Game/Screens/SelectV2/BeatmapLeaderboardWedge.cs index d34c202640..0c21d4f6ed 100644 --- a/osu.Game/Screens/SelectV2/BeatmapLeaderboardWedge.cs +++ b/osu.Game/Screens/SelectV2/BeatmapLeaderboardWedge.cs @@ -266,6 +266,12 @@ namespace osu.Game.Screens.SelectV2 if (scores == null) return; + // because leaderboard refetches are debounced, it is technically possible for the global leaderboard manager + // to contain scores for a different beatmap than the ones the wedge is currently on. + // in this case, ignore the incoming scores to avoid briefly flashing the wrong leaderboard. + if (leaderboardManager.CurrentCriteria?.Beatmap?.Equals(beatmap.Value.BeatmapInfo) != true) + return; + if (scores.FailState != null) SetState((LeaderboardState)scores.FailState); else