Some Cleanups

This commit is contained in:
hondacrx
2021-06-07 18:06:16 -04:00
parent cb7640e3c6
commit 302a1f293c
53 changed files with 382 additions and 477 deletions
+3 -3
View File
@@ -110,8 +110,8 @@ namespace Game.Maps
// Add extra points to allow derivative calculations for all path nodes
allPoints.Insert(0, allPoints.First().lerp(allPoints[1], -0.2f));
allPoints.Add(allPoints.Last().lerp(allPoints[allPoints.Count - 2], -0.2f));
allPoints.Add(allPoints.Last().lerp(allPoints[allPoints.Count - 2], -1.0f));
allPoints.Add(allPoints.Last().lerp(allPoints[^2], -0.2f));
allPoints.Add(allPoints.Last().lerp(allPoints[^2], -1.0f));
SplineRawInitializer initer = new(allPoints);
Spline orientationSpline = new();
@@ -204,7 +204,7 @@ namespace Game.Maps
int extra = !keyFrames[i - 1].Teleport ? 1 : 0;
Spline spline = new();
Span<Vector3> span = splinePath.ToArray();
spline.InitSpline(span.Slice(start), i - start + extra, Spline.EvaluationMode.Catmullrom);
spline.InitSpline(span[start..], i - start + extra, Spline.EvaluationMode.Catmullrom);
spline.InitLengths();
for (int j = start; j < i + extra; ++j)
{