Core/Movement: Switch to uncompressed paths in spline packets automatically when too large or too small delta between points is detected

Port From (https://github.com/TrinityCore/TrinityCore/commit/377b51f76828befaaf6a6e7c3a9405fc8798d93d)
This commit is contained in:
Hondacrx
2024-08-18 21:07:00 -04:00
parent da8b685c14
commit 7d83729d84
3 changed files with 36 additions and 34 deletions
+2 -1
View File
@@ -120,6 +120,7 @@ namespace Game.Movement
}
public Vector3[] GetPath() { return spline.GetPoints(); }
public int timeRemaining() { return Duration() - time_passed; }
public int TimePassed() { return time_passed; }
public int Duration() { return spline.Length(); }
@@ -339,7 +340,7 @@ namespace Game.Movement
public Vector3 CurrentDestination() { return Initialized() ? spline.GetPoint(point_Idx + 1) : Vector3.Zero; }
public AnimTier? GetAnimation() { return anim_tier != null ? (AnimTier)anim_tier.AnimTier : null; }
#region Fields
public MoveSplineInitArgs InitArgs;
public Spline<int> spline = new();