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
@@ -17,6 +17,12 @@ namespace Game.Movement
public UnitState BaseUnitState;
public TaskCompletionSource<MovementStopReason> ScriptResult;
~MovementGenerator()
{
// Ensure script doesn't get stuck waiting for this movement
SetScriptResult(MovementStopReason.Interrupted);
}
// on top first update
public virtual void Initialize(Unit owner) { }