1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 01:27:29 +08:00

Check current point instead of start point

Since each control point will call this when the path updates, the previous would correct the start segment 3 times instead of just once.

This fixes that.
This commit is contained in:
Naxess 2021-03-31 20:25:46 +02:00
parent 75b8f2535f
commit 5022a78e80

View File

@ -212,7 +212,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
/// </summary>
private void updatePathType()
{
if (PointsInSegment[0].Type.Value != PathType.PerfectCurve)
if (ControlPoint.Type.Value != PathType.PerfectCurve)
return;
ReadOnlySpan<Vector2> points = PointsInSegment.Select(p => p.Position.Value).ToArray();
@ -221,7 +221,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
RectangleF boundingBox = PathApproximator.CircularArcBoundingBox(points);
if (boundingBox.Width >= 640 || boundingBox.Height >= 480)
PointsInSegment[0].Type.Value = PathType.Bezier;
ControlPoint.Type.Value = PathType.Bezier;
}
/// <summary>