mirror of
https://github.com/ppy/osu.git
synced 2026-05-18 09:49:53 +08:00
Merge pull request #33610 from bdach/solo-results-show-local
Fix results screen not showing local scores on results screen for some beatmap statuses
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user