More cleanups of custom classes in favor of .NET runtime types.
This commit is contained in:
@@ -17,11 +17,12 @@
|
||||
|
||||
using Framework.Constants;
|
||||
using Framework.GameMath;
|
||||
using Game.Collision;
|
||||
using Game.DataStorage;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Game.Collision;
|
||||
using System.Numerics;
|
||||
|
||||
namespace Game.Maps
|
||||
{
|
||||
@@ -175,7 +176,7 @@ namespace Game.Maps
|
||||
|
||||
_minHeightPlanes = new Plane[8];
|
||||
for (uint quarterIndex = 0; quarterIndex < 8; ++quarterIndex)
|
||||
_minHeightPlanes[quarterIndex] = new Plane(
|
||||
_minHeightPlanes[quarterIndex] = Plane.CreateFromVertices(
|
||||
new Vector3(boundGridCoords[indices[quarterIndex][0]][0], boundGridCoords[indices[quarterIndex][0]][1], minHeights[indices[quarterIndex][0]]),
|
||||
new Vector3(boundGridCoords[indices[quarterIndex][1]][0], boundGridCoords[indices[quarterIndex][1]][1], minHeights[indices[quarterIndex][1]]),
|
||||
new Vector3(boundGridCoords[indices[quarterIndex][2]][0], boundGridCoords[indices[quarterIndex][2]][1], minHeights[indices[quarterIndex][2]])
|
||||
@@ -500,8 +501,7 @@ namespace Game.Maps
|
||||
else
|
||||
quarterIndex = gx > gy ? 1u : 0;
|
||||
|
||||
|
||||
Ray ray = new(new Vector3(gx, gy, 0.0f), Vector3.ZAxis);
|
||||
Ray ray = new(new Vector3(gx, gy, 0.0f), Vector3.UnitZ);
|
||||
return ray.intersection(_minHeightPlanes[quarterIndex]).Z;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
using Framework.Constants;
|
||||
using Framework.Database;
|
||||
using Framework.Dynamic;
|
||||
using Framework.GameMath;
|
||||
using Game.BattleGrounds;
|
||||
using Game.Collision;
|
||||
using Game.DataStorage;
|
||||
@@ -32,6 +31,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
|
||||
namespace Game.Maps
|
||||
{
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
|
||||
using Framework.Constants;
|
||||
using Framework.Database;
|
||||
using Framework.GameMath;
|
||||
using Game.DataStorage;
|
||||
using Game.Entities;
|
||||
using Game.Movement;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
|
||||
namespace Game.Maps
|
||||
{
|
||||
@@ -186,9 +186,9 @@ namespace Game.Maps
|
||||
allPoints.Add(new Vector3(path[i].Loc.X, path[i].Loc.Y, path[i].Loc.Z));
|
||||
|
||||
// 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[^2], -0.2f));
|
||||
allPoints.Add(allPoints.Last().lerp(allPoints[^2], -1.0f));
|
||||
allPoints.Insert(0, Vector3.Lerp(allPoints.First(), allPoints[1], -0.2f));
|
||||
allPoints.Add(Vector3.Lerp(allPoints.Last(), allPoints[^2], -0.2f));
|
||||
allPoints.Add(Vector3.Lerp(allPoints.Last(), allPoints[^2], -1.0f));
|
||||
|
||||
SplineRawInitializer initer = new(allPoints);
|
||||
Spline orientationSpline = new();
|
||||
|
||||
Reference in New Issue
Block a user