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

fix control points being cleared

This commit is contained in:
OliBomby 2023-12-03 20:53:25 +01:00
parent 4cd6efc8f7
commit 8873824107

View File

@ -311,7 +311,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
{
IReadOnlyList<List<Vector2>> builderPoints = bSplineBuilder.ControlPoints;
if (builderPoints.Count == 0)
if (builderPoints.Count == 0 || builderPoints[0].Count == 0)
return;
PathType? lastPathType = null;
@ -326,6 +326,9 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
var segment = builderPoints[i];
int pointsInSegment = segment.Count;
if (segment.Count == 0)
continue;
// Where possible, we can use the simpler LINEAR path type.
PathType? pathType = pointsInSegment == 1 ? PathType.LINEAR : PathType.BSpline(3);