Fix control points not adding to last segment

This commit is contained in:
smoogipoo 2019-12-09 22:44:47 +09:00
parent bd2b0af269
commit 2c4c190f15
1 changed files with 1 additions and 1 deletions

View File

@ -104,7 +104,7 @@ private int addControlPoint(Vector2 position)
int insertionIndex = 0;
float minDistance = float.MaxValue;
for (int i = 0; i < HitObject.Path.ControlPoints.Count - 2; i++)
for (int i = 0; i < HitObject.Path.ControlPoints.Count - 1; i++)
{
float dist = new Line(HitObject.Path.ControlPoints[i].Position.Value, HitObject.Path.ControlPoints[i + 1].Position.Value).DistanceToPoint(position);