1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 07:33:20 +08:00

Update to respect distance snap

This will cause freehand drawing to respect distance snap, instead
changing the drawn path to start from the sliders start position
and "snap" in a linear fashion to the cursor position from the
position indicated by distance snap
This commit is contained in:
cs 2023-11-22 10:14:44 +01:00
parent f7fce1d714
commit 95b12082ae

View File

@ -175,7 +175,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
if (controlPointCount > 2 || (controlPointCount == 2 && HitObject.Path.ControlPoints.Last() != cursor))
return base.OnDragStart(e);
HitObject.Position = ToLocalSpace(e.ScreenSpaceMouseDownPosition);
bSplineBuilder.AddLinearPoint(Vector2.Zero);
bSplineBuilder.AddLinearPoint(ToLocalSpace(e.ScreenSpaceMouseDownPosition) - HitObject.Position);
state = SliderPlacementState.Drawing;
return true;