diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index cc843ab42b..d9ed57c793 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -11835,8 +11835,8 @@ void Unit::SetStunned(bool apply) SetTarget(ObjectGuid::Empty); SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED); - // Stop movement if unit is affected by point motion master - if (GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE) + // Stop movement if unit is affected by parabolic splines (eg. knockbacks, pulls, etc.) + if (!movespline->isParabolic()) StopMoving(); if (GetTypeId() == TYPEID_PLAYER) @@ -11871,8 +11871,8 @@ void Unit::SetRooted(bool apply, bool packetOnly /*= false*/) // setting MOVEMENTFLAG_ROOT RemoveUnitMovementFlag(MOVEMENTFLAG_MASK_MOVING); AddUnitMovementFlag(MOVEMENTFLAG_ROOT); - // Stop movement if unit is affected by point motion master - if (GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE) + // Stop movement if unit is affected by parabolic splines (eg. knockbacks, pulls, etc.) + if (!movespline->isParabolic()) StopMoving(); } else diff --git a/src/server/game/Movement/Spline/MoveSpline.h b/src/server/game/Movement/Spline/MoveSpline.h index f28f8a38e0..28ac14b0f6 100644 --- a/src/server/game/Movement/Spline/MoveSpline.h +++ b/src/server/game/Movement/Spline/MoveSpline.h @@ -117,6 +117,7 @@ namespace Movement bool Finalized() const { return splineflags.done; } bool isCyclic() const { return splineflags.cyclic; } bool isFalling() const { return splineflags.falling; } + bool isParabolic() const { return splineflags.parabolic; } Vector3 FinalDestination() const { return Initialized() ? spline.getPoint(spline.last()) : Vector3(); } Vector3 CurrentDestination() const { return Initialized() ? spline.getPoint(point_Idx + 1) : Vector3(); } int32 currentPathIdx() const;