From de57daeb3c65bd0c8be1de69e7a4cd4b3f78594b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Tue, 10 Jun 2025 10:48:26 +0200 Subject: [PATCH 1/2] Fix results screen not showing local scores on results screen for some beatmap statuses Closes https://github.com/ppy/osu/issues/33609. Case of leftover code that should have been removed. This condition is still active in the online leaderboards path via https://github.com/ppy/osu/blob/4dcc928c7e46e020c62f4d60e7b859ba18c9142f/osu.Game/Online/Leaderboards/LeaderboardManager.cs#L91-L95 Not sure trying to add test coverage is a productive use of time? Will do on request though. --- osu.Game/Screens/Ranking/SoloResultsScreen.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/osu.Game/Screens/Ranking/SoloResultsScreen.cs b/osu.Game/Screens/Ranking/SoloResultsScreen.cs index d11e7db178..7d57bc80aa 100644 --- a/osu.Game/Screens/Ranking/SoloResultsScreen.cs +++ b/osu.Game/Screens/Ranking/SoloResultsScreen.cs @@ -8,7 +8,6 @@ using System.Threading.Tasks; using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Logging; -using osu.Game.Beatmaps; using osu.Game.Extensions; using osu.Game.Online.API; using osu.Game.Online.Leaderboards; @@ -42,9 +41,6 @@ namespace osu.Game.Screens.Ranking { Debug.Assert(Score != null); - if (Score.BeatmapInfo!.OnlineID <= 0 || Score.BeatmapInfo.Status <= BeatmapOnlineStatus.Pending) - return []; - var criteria = new LeaderboardCriteria( Score.BeatmapInfo!, Score.Ruleset, From c84988a2ecef08d1c5aa309a28d7f2f2757372f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Tue, 10 Jun 2025 12:32:03 +0200 Subject: [PATCH 2/2] Do not attempt to add displayed score to list of sorted scores more than once This is a very dodgy fix, but it fixes an edge case that has so far - to my knowledge - not been reported by users in the wild, only by me trying to break things, so my hope is that we can do this and move on for now. --- osu.Game/Screens/Ranking/SoloResultsScreen.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/osu.Game/Screens/Ranking/SoloResultsScreen.cs b/osu.Game/Screens/Ranking/SoloResultsScreen.cs index 7d57bc80aa..1d09654063 100644 --- a/osu.Game/Screens/Ranking/SoloResultsScreen.cs +++ b/osu.Game/Screens/Ranking/SoloResultsScreen.cs @@ -74,6 +74,12 @@ namespace osu.Game.Screens.Ranking // this simplifies handling later. if (clonedScore.Equals(Score) || clonedScore.MatchesOnlineID(Score)) { + // this is a precautionary guard that prevents `Score` from appearing multiple times in the list. + // that can occur in rare cases wherein two local scores have the same online ID but different replay contents + // (this is possible e.g. in cases of client-side vs server-side recorded replays, see https://github.com/ppy/osu-server-spectator/issues/193) + if (sortedScores.Contains(Score)) + continue; + Score.Position = clonedScore.Position; sortedScores.Add(Score); }