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:
parent
caa2bdf012
commit
e9269dc83b
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user