Fix next track starting before previous one is paused

Closes #9651.
This commit is contained in:
Dean Herbert 2020-07-31 20:33:18 +09:00
parent e2baa0e5cb
commit 4d2a677080

View File

@ -262,7 +262,11 @@ namespace osu.Game.Overlays
{
if (beatmap is Bindable<WorkingBeatmap> working)
working.Value = beatmaps.GetWorkingBeatmap(playable.Beatmaps.First(), beatmap.Value);
beatmap.Value.Track.Restart();
// if not scheduled, the previously track will be stopped one frame later (see ScheduleAfterChildren logic in GameBase).
// we probably want to move this to a central method for switching to a new working beatmap in the future.
Schedule(() => beatmap.Value.Track.Restart());
return true;
}