mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 01:53:01 +08:00
Also fix second instance of same execution
This commit is contained in:
parent
4d2a677080
commit
e8f75a78e8
@ -236,8 +236,8 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
if (beatmap is Bindable<WorkingBeatmap> working)
|
||||
working.Value = beatmaps.GetWorkingBeatmap(playable.Beatmaps.First(), beatmap.Value);
|
||||
beatmap.Value.Track.Restart();
|
||||
|
||||
restartTrack();
|
||||
return PreviousTrackResult.Previous;
|
||||
}
|
||||
|
||||
@ -263,16 +263,20 @@ namespace osu.Game.Overlays
|
||||
if (beatmap is Bindable<WorkingBeatmap> working)
|
||||
working.Value = beatmaps.GetWorkingBeatmap(playable.Beatmaps.First(), beatmap.Value);
|
||||
|
||||
// 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());
|
||||
|
||||
restartTrack();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void restartTrack()
|
||||
{
|
||||
// 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());
|
||||
}
|
||||
|
||||
private WorkingBeatmap current;
|
||||
|
||||
private TrackChangeDirection? queuedDirection;
|
||||
|
Loading…
Reference in New Issue
Block a user