mirror of
https://github.com/osukey/osukey.git
synced 2025-06-08 21:07:59 +09: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:
parent
75b8f2535f
commit
5022a78e80
@ -212,7 +212,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void updatePathType()
|
private void updatePathType()
|
||||||
{
|
{
|
||||||
if (PointsInSegment[0].Type.Value != PathType.PerfectCurve)
|
if (ControlPoint.Type.Value != PathType.PerfectCurve)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ReadOnlySpan<Vector2> points = PointsInSegment.Select(p => p.Position.Value).ToArray();
|
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);
|
RectangleF boundingBox = PathApproximator.CircularArcBoundingBox(points);
|
||||||
if (boundingBox.Width >= 640 || boundingBox.Height >= 480)
|
if (boundingBox.Width >= 640 || boundingBox.Height >= 480)
|
||||||
PointsInSegment[0].Type.Value = PathType.Bezier;
|
ControlPoint.Type.Value = PathType.Bezier;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user