mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 13:16:23 +00:00
fix(Core/Movement): Fix strange teleport when rooting a fleeing NPC (#5555)
This commit is contained in:
@@ -17,6 +17,14 @@
|
||||
template<class T>
|
||||
void PointMovementGenerator<T>::DoInitialize(T* unit)
|
||||
{
|
||||
if (unit->HasUnitState(UNIT_STATE_ROOT | UNIT_STATE_STUNNED))
|
||||
{
|
||||
// the next line is to ensure that a new spline is created in DoUpdate() once the unit is no longer rooted/stunned
|
||||
// todo: rename this flag to something more appropriate since it is set to true even without speed change now.
|
||||
i_recalculateSpeed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!unit->IsStopped())
|
||||
unit->StopMoving();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user