Core/Movement: Ensure land and takeoff animations even if gravity enabled/disabled state is not what spline generator expects

Port From (https://github.com/TrinityCore/TrinityCore/commit/be3ae90dc488894afea8e4cca74d9105558fff53)
This commit is contained in:
Hondacrx
2024-08-05 14:17:54 -04:00
parent 9eefaca29a
commit 39198d0ffc
5 changed files with 33 additions and 23 deletions
+4 -1
View File
@@ -645,6 +645,8 @@ namespace Game.Movement
{
init.MoveTo(pos, false);
init.SetAnimation(AnimTier.Ground, tierTransitionId.GetValueOrDefault(1));
init.SetFly(); // ensure smooth animation even if gravity is enabled before calling this function
init.SetSmooth();
switch (speedSelectionMode)
{
case MovementWalkRunSpeedSelectionMode.ForceRun:
@@ -669,7 +671,8 @@ namespace Game.Movement
var initializer = (MoveSplineInit init) =>
{
init.MoveTo(pos, false);
init.SetAnimation(AnimTier.Hover, tierTransitionId.GetValueOrDefault(15));
init.SetAnimation(AnimTier.Fly, tierTransitionId.GetValueOrDefault(2));
init.SetFly(); // ensure smooth animation even if gravity is disabled after calling this function
switch (speedSelectionMode)
{
case MovementWalkRunSpeedSelectionMode.ForceRun: