1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 09:02:55 +08:00

Apply beat snap if positional snap doesn't give a time result

This commit is contained in:
Dean Herbert 2020-11-26 19:20:51 +09:00
parent 91592cf32d
commit da6bccc812

View File

@ -157,6 +157,9 @@ namespace osu.Game.Screens.Edit.Compose.Components
{
var snapResult = Composer.SnapScreenSpacePositionToValidTime(inputManager.CurrentState.Mouse.Position);
// if no time was found from positional snapping, we should still quantize to the beat.
snapResult.Time ??= Beatmap.SnapTime(EditorClock.CurrentTime, null);
currentPlacement.UpdateTimeAndPosition(snapResult);
}