mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:12:54 +08:00
Dont snap expected distance while drawing
This makes it 10 billion times smoother to draw, very nice
This commit is contained in:
parent
ca55a7b2bf
commit
b3d1a9ee2e
@ -200,6 +200,9 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
|
|||||||
{
|
{
|
||||||
bSplineBuilder.Finish();
|
bSplineBuilder.Finish();
|
||||||
updateSliderPathFromBSplineBuilder();
|
updateSliderPathFromBSplineBuilder();
|
||||||
|
|
||||||
|
// Change the state so it will snap the expected distance in endCurve.
|
||||||
|
state = SliderPlacementState.Finishing;
|
||||||
endCurve();
|
endCurve();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -304,7 +307,10 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
|
|||||||
|
|
||||||
private void updateSlider()
|
private void updateSlider()
|
||||||
{
|
{
|
||||||
HitObject.Path.ExpectedDistance.Value = distanceSnapProvider?.FindSnappedDistance(HitObject, (float)HitObject.Path.CalculatedDistance) ?? (float)HitObject.Path.CalculatedDistance;
|
if (state == SliderPlacementState.Drawing)
|
||||||
|
HitObject.Path.ExpectedDistance.Value = (float)HitObject.Path.CalculatedDistance;
|
||||||
|
else
|
||||||
|
HitObject.Path.ExpectedDistance.Value = distanceSnapProvider?.FindSnappedDistance(HitObject, (float)HitObject.Path.CalculatedDistance) ?? (float)HitObject.Path.CalculatedDistance;
|
||||||
|
|
||||||
bodyPiece.UpdateFrom(HitObject);
|
bodyPiece.UpdateFrom(HitObject);
|
||||||
headCirclePiece.UpdateFrom(HitObject.HeadCircle);
|
headCirclePiece.UpdateFrom(HitObject.HeadCircle);
|
||||||
@ -343,7 +349,8 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
|
|||||||
{
|
{
|
||||||
Initial,
|
Initial,
|
||||||
ControlPoints,
|
ControlPoints,
|
||||||
Drawing
|
Drawing,
|
||||||
|
Finishing
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user