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:
blinkysc 2026-03-25 10:34:10 -05:00 committed by GitHub
parent 14813462eb
commit f3d2a28083
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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
{