Core/Movement: Don't compute orientation for vertical splines

Port From (https://github.com/TrinityCore/TrinityCore/commit/8d83c78618d5cde9f09e68e193ecb366b52b8381)
This commit is contained in:
hondacrx
2023-01-06 16:01:16 -05:00
parent a804b4eeb8
commit 0b9faa25cf
+2 -1
View File
@@ -172,7 +172,8 @@ namespace Game.Movement
{
Vector3 hermite;
spline.Evaluate_Derivative(point_Idx, u, out hermite);
orientation = MathF.Atan2(hermite.Y, hermite.X);
if (hermite.X != 0f || hermite.Y != 0f)
orientation = MathF.Atan2(hermite.Y, hermite.X);
}
if (splineflags.HasFlag(SplineFlag.Backward))