1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 18:23:04 +08:00

Fix "Use current" snap not working

Regressed with https://github.com/ppy/osu/pull/27249.

I was suspicious of this specific operation at the time but didn't test properly.
This commit is contained in:
Dean Herbert 2024-02-26 14:11:54 +08:00
parent b0c45c87c6
commit 4c744ccb69
No known key found for this signature in database

View File

@ -132,7 +132,7 @@ namespace osu.Game.Rulesets.Edit
if (objTime >= editorClock.CurrentTime) if (objTime >= editorClock.CurrentTime)
continue; continue;
if (objTime > lastBefore?.StartTime) if (lastBefore == null || objTime > lastBefore?.StartTime)
lastBefore = entry.Value.HitObject; lastBefore = entry.Value.HitObject;
} }
@ -148,7 +148,7 @@ namespace osu.Game.Rulesets.Edit
if (objTime < editorClock.CurrentTime) if (objTime < editorClock.CurrentTime)
continue; continue;
if (objTime < firstAfter?.StartTime) if (firstAfter == null || objTime < firstAfter?.StartTime)
firstAfter = entry.Value.HitObject; firstAfter = entry.Value.HitObject;
} }