fix(Core/Movement): Prevent vehicles from following their own passenger on evade (#25225)
Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
This commit is contained in:
parent
14813462eb
commit
f3d2a28083
1 changed files with 5 additions and 2 deletions
|
|
@ -246,8 +246,11 @@ void CreatureAI::EnterEvadeMode(EvadeReason why)
|
|||
// Owned creatures (pets/guardians) follow their owner — clear evade state
|
||||
// so they can re-enter combat immediately via CanBeginCombat
|
||||
me->ClearUnitState(UNIT_STATE_EVADE);
|
||||
me->GetMotionMaster()->Clear(false);
|
||||
me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle(), MOTION_SLOT_ACTIVE);
|
||||
if (!me->IsVehicle()) // vehicles should not follow their owner (passenger)
|
||||
{
|
||||
me->GetMotionMaster()->Clear(false);
|
||||
me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle(), MOTION_SLOT_ACTIVE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue