From 426f9f2f92b26fbb68e7cda9290ccbd586c6af4e Mon Sep 17 00:00:00 2001 From: ccrs Date: Sun, 3 Jun 2018 10:06:57 -0700 Subject: Core/Movement: MotionMaster reimplementation (#21888) Internal structure and handling changes, nothing behavioural (or thats the intention at least). (cherry picked from commit 982643cd96790ffc54e7a3e507469649f3b074d2) --- src/server/game/AI/CreatureAI.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/server/game/AI/CreatureAI.cpp') diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index e41d104c380..4e8e035bf5b 100644 --- a/src/server/game/AI/CreatureAI.cpp +++ b/src/server/game/AI/CreatureAI.cpp @@ -160,9 +160,7 @@ void CreatureAI::TriggerAlert(Unit const* who) const me->SendAIReaction(AI_REACTION_ALERT); // Face the unit (stealthed player) and set distracted state for 5 seconds - me->GetMotionMaster()->MoveDistract(5 * IN_MILLISECONDS); - me->StopMoving(); - me->SetFacingTo(me->GetAbsoluteAngle(who)); + me->GetMotionMaster()->MoveDistract(5 * IN_MILLISECONDS, me->GetAbsoluteAngle(who)); } void CreatureAI::EnterEvadeMode(EvadeReason why) @@ -176,8 +174,8 @@ void CreatureAI::EnterEvadeMode(EvadeReason why) { if (Unit* owner = me->GetCharmerOrOwner()) { - me->GetMotionMaster()->Clear(false); - me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle(), MOTION_SLOT_ACTIVE); + me->GetMotionMaster()->Clear(); + me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle()); } else { -- cgit v1.2.3