Core/Movement: do not reposition against chase targets that are still moving

This commit is contained in:
Ovahlord
2020-04-16 21:53:33 +02:00
parent 4797ec3194
commit b8802ccaa2

View File

@@ -141,7 +141,7 @@ bool ChaseMovementGenerator::Update(Unit* owner, uint32 diff)
{
_nextRepositioningTimer.Reset(REPOSITION_MOVEMENT_INTERVAL);
if (!owner->HasUnitState(UNIT_STATE_CHASE_MOVE) && owner->IsCreature())
if (!owner->HasUnitState(UNIT_STATE_CHASE_MOVE) && owner->IsCreature() && !target->isMoving())
{
// Owner is too close to its target. Step back.
if (owner->GetExactDist2d(target) < owner->GetBoundaryRadius())