Use better logic

This commit is contained in:
Dean Herbert 2018-07-13 21:08:41 +09:00
parent a1a077398c
commit 6d8923a37c

View File

@ -189,22 +189,31 @@ namespace osu.Game
{
CloseAllOverlays(false);
void setBeatmap() => Beatmap.Value = BeatmapManager.GetWorkingBeatmap(beatmap.Beatmaps.First());
void setBeatmap()
{
if (Beatmap.Disabled)
{
Schedule(setBeatmap);
return;
}
Beatmap.Value = BeatmapManager.GetWorkingBeatmap(beatmap.Beatmaps.First());
};
switch (currentScreen)
{
case SongSelect _:
setBeatmap();
break;
default:
// navigate to song select if we are not already there.
var menu = (MainMenu)intro.ChildScreen;
menu.MakeCurrent();
setBeatmap();
menu.LoadToSolo();
break;
}
setBeatmap();
}
/// <summary>