fix(Core/Movement): Prevent SmartAI vehicles from following the player on evades (#26882)

This commit is contained in:
Gultask
2026-07-31 06:02:30 -03:00
committed by GitHub
parent 0c42af162a
commit 3a330de98b

View File

@@ -759,7 +759,9 @@ void SmartAI::EnterEvadeMode(EvadeReason why)
if (Unit* owner = me->GetCharmerOrOwner())
{
me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle());
if (!me->IsVehicle()) // vehicles should not follow their owner (passenger)
me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle());
me->ClearUnitState(UNIT_STATE_EVADE);
}
else if (HasEscortState(SMART_ESCORT_ESCORTING))