mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 21:42:55 +08:00
Avoid querying GetLastObjectTime
twice in editor seek flow
This commit is contained in:
parent
809d02cda0
commit
a2db0afe19
@ -537,10 +537,14 @@ namespace osu.Game.Screens.Edit
|
|||||||
// Seek to last object time, or track end if already there.
|
// Seek to last object time, or track end if already there.
|
||||||
// Note that in osu-stable subsequent presses when at track end won't return to last object.
|
// Note that in osu-stable subsequent presses when at track end won't return to last object.
|
||||||
// This has intentionally been changed to make it more useful.
|
// This has intentionally been changed to make it more useful.
|
||||||
if (!editorBeatmap.HitObjects.Any() || clock.CurrentTime == editorBeatmap.GetLastObjectTime())
|
if (!editorBeatmap.HitObjects.Any())
|
||||||
|
{
|
||||||
clock.Seek(clock.TrackLength);
|
clock.Seek(clock.TrackLength);
|
||||||
else
|
return true;
|
||||||
clock.Seek(editorBeatmap.GetLastObjectTime());
|
}
|
||||||
|
|
||||||
|
double lastObjectTime = editorBeatmap.GetLastObjectTime();
|
||||||
|
clock.Seek(clock.CurrentTime == lastObjectTime ? clock.TrackLength : lastObjectTime);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user