Combine config and time checks into one

Functionally equivalent right now, but the combined variant is more
localised to what it actually needs to do, and less error-prone if
any new code gets appended to the method.
This commit is contained in:
Bartłomiej Dach
2023-02-19 13:14:51 +01:00
parent 723a043c43
commit aac32a2c9f

View File

@ -369,9 +369,7 @@ namespace osu.Game.Rulesets.Edit
{
EditorBeatmap.Add(hitObject);
if (!seekToHitObject.Value) return;
if (EditorClock.CurrentTime < hitObject.StartTime)
if (seekToHitObject.Value && EditorClock.CurrentTime < hitObject.StartTime)
EditorClock.SeekSmoothlyTo(hitObject.StartTime);
}
}