1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-02 03:42:57 +08:00

Move conditional

This commit is contained in:
Salman Alshamrani 2024-10-14 09:55:24 -04:00
parent f8c8184c5c
commit 40b98d4863

View File

@ -297,9 +297,6 @@ namespace osu.Game.Screens.Edit.Compose.Components
private void updatePlacementTimeAndPosition() private void updatePlacementTimeAndPosition()
{ {
if (CurrentPlacement == null)
return;
var snapResult = Composer.FindSnappedPositionAndTime(InputManager.CurrentState.Mouse.Position, CurrentPlacement.SnapType); var snapResult = Composer.FindSnappedPositionAndTime(InputManager.CurrentState.Mouse.Position, CurrentPlacement.SnapType);
// if no time was found from positional snapping, we should still quantize to the beat. // if no time was found from positional snapping, we should still quantize to the beat.
@ -339,7 +336,9 @@ namespace osu.Game.Screens.Edit.Compose.Components
protected override bool OnMouseMove(MouseMoveEvent e) protected override bool OnMouseMove(MouseMoveEvent e)
{ {
// updates the placement with the latest mouse position. // updates the placement with the latest mouse position.
if (CurrentPlacement != null)
updatePlacementTimeAndPosition(); updatePlacementTimeAndPosition();
return base.OnMouseMove(e); return base.OnMouseMove(e);
} }