Core/Movement: Add support to cyclic splines to GenericMovementGenerator
Port From (https://github.com/TrinityCore/TrinityCore/commit/a5b4d0c53976119d561924143a465c9ab38ca8a8)
This commit is contained in:
@@ -70,7 +70,10 @@ namespace Game.Movement
|
|||||||
if (!owner || HasFlag(MovementGeneratorFlags.Finalized))
|
if (!owner || HasFlag(MovementGeneratorFlags.Finalized))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// Cyclic splines never expire, so update the duration only if it's not cyclic
|
||||||
|
if (!owner.MoveSpline.IsCyclic())
|
||||||
_duration.Update((int)diff);
|
_duration.Update((int)diff);
|
||||||
|
|
||||||
if (_duration.Passed() || owner.MoveSpline.Finalized())
|
if (_duration.Passed() || owner.MoveSpline.Finalized())
|
||||||
{
|
{
|
||||||
AddFlag(MovementGeneratorFlags.InformEnabled);
|
AddFlag(MovementGeneratorFlags.InformEnabled);
|
||||||
|
|||||||
Reference in New Issue
Block a user