From a80fecffe7d4a336f4e1d55ba52c1f1ef558949d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Mon, 28 Jul 2025 11:43:15 +0200 Subject: [PATCH] Add a comment about a sneaky part of the leaderboard sorting changes --- osu.Game/Screens/Play/PlayerLoader.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index 848b8292d4..b6a765153c 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -277,6 +277,12 @@ namespace osu.Game.Screens.Play showStoryboards.BindValueChanged(val => epilepsyWarning?.FadeTo(val.NewValue ? 1 : 0, 250, Easing.OutQuint), true); epilepsyWarning?.FinishTransforms(true); + // this re-fetch has two purposes: + // - is a safety against potential unexpected screen transitions, making sure that the leaderboard + // displayed during gameplay definitely matches the beatmap and ruleset being played + // (as the solo gameplay leaderboard provider uses the global leaderboard manager to populate itself) + // - the sort mode is not specified and defaults to `Score` which is good because gameplay leaderboards only support sorting by score. + // this may change at some point in the future, at which point specifying a sort mode should be considered. leaderboardManager?.FetchWithCriteria(new LeaderboardCriteria( Beatmap.Value.BeatmapInfo, Ruleset.Value,