1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 12:53:11 +08:00

Prevent unnecessary query in OsuGame::PresentBeatmap

This resolves issue #4575
This commit is contained in:
Samuel Van Allen 2019-04-02 23:57:31 +08:00
parent caa2bdf012
commit e9269dc83b

View File

@ -254,6 +254,12 @@ namespace osu.Game
if (menuScreen.IsCurrentScreen())
menuScreen.LoadToSolo();
// we might even already be at the song
if (Beatmap.Value.BeatmapSetInfo.OnlineBeatmapSetID == beatmap.OnlineBeatmapSetID)
{
return;
}
// Use first beatmap available for current ruleset, else switch ruleset.
var first = databasedSet.Beatmaps.Find(b => b.Ruleset == ruleset.Value) ?? databasedSet.Beatmaps.First();