1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-21 11:22:55 +08:00

Further simplify logic

This commit is contained in:
voidedWarranties 2021-03-18 16:20:31 -07:00
parent df6570ebf5
commit b9761c8196

View File

@ -226,14 +226,14 @@ namespace osu.Game.Screens.Edit
{ {
underlyingClock.ProcessFrame(); underlyingClock.ProcessFrame();
var playbackAlreadyStopped = playbackFinished;
playbackFinished = CurrentTime >= TrackLength; playbackFinished = CurrentTime >= TrackLength;
if (playbackFinished && !playbackAlreadyStopped) if (playbackFinished)
{ {
if (IsRunning) if (IsRunning)
underlyingClock.Stop(); underlyingClock.Stop();
if (CurrentTime > TrackLength)
underlyingClock.Seek(TrackLength); underlyingClock.Seek(TrackLength);
} }
} }