mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 08:22:56 +08:00
Fix song select leaderboard potentially showing wrong scores on quick beatmap changes
Closes #22002.
This commit is contained in:
parent
53cc71c2fe
commit
8f7ae0395a
@ -154,10 +154,17 @@ namespace osu.Game.Screens.Select.Leaderboards
|
|||||||
|
|
||||||
scoreRetrievalRequest = new GetScoresRequest(fetchBeatmapInfo, fetchRuleset, Scope, requestMods);
|
scoreRetrievalRequest = new GetScoresRequest(fetchBeatmapInfo, fetchRuleset, Scope, requestMods);
|
||||||
|
|
||||||
scoreRetrievalRequest.Success += response => SetScores(
|
scoreRetrievalRequest.Success += response => Schedule(() =>
|
||||||
scoreManager.OrderByTotalScore(response.Scores.Select(s => s.ToScoreInfo(rulesets, fetchBeatmapInfo))),
|
{
|
||||||
response.UserScore?.CreateScoreInfo(rulesets, fetchBeatmapInfo)
|
// Beatmap may have changed since fetch request. Can't rely on request cancellation due to Schedule inside SetScores.
|
||||||
);
|
if (!fetchBeatmapInfo.Equals(BeatmapInfo))
|
||||||
|
return;
|
||||||
|
|
||||||
|
SetScores(
|
||||||
|
scoreManager.OrderByTotalScore(response.Scores.Select(s => s.ToScoreInfo(rulesets, fetchBeatmapInfo))),
|
||||||
|
response.UserScore?.CreateScoreInfo(rulesets, fetchBeatmapInfo)
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
return scoreRetrievalRequest;
|
return scoreRetrievalRequest;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user