diff --git a/osu.Game/Screens/Ranking/SoloResultsScreen.cs b/osu.Game/Screens/Ranking/SoloResultsScreen.cs index b967c9de93..56d175420f 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, @@ -78,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); }