mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 07:48:02 +00:00
fix(Core/Movement): Prevent SmartAI vehicles from following the player on evades (#26882)
This commit is contained in:
@@ -759,7 +759,9 @@ void SmartAI::EnterEvadeMode(EvadeReason why)
|
|||||||
|
|
||||||
if (Unit* owner = me->GetCharmerOrOwner())
|
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);
|
me->ClearUnitState(UNIT_STATE_EVADE);
|
||||||
}
|
}
|
||||||
else if (HasEscortState(SMART_ESCORT_ESCORTING))
|
else if (HasEscortState(SMART_ESCORT_ESCORTING))
|
||||||
|
|||||||
Reference in New Issue
Block a user