Core/Movement: don't stop movements on stuns when the target is currently affected by parabolic splines

This commit is contained in:
Ovalord committed 2018-02-14 14:41:34 +01:00
1 parent 2879ac3106
commit 844450d542
2 files changed
+5 -4

No files matched your search

+4 -4
View File
@@ -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