aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/AI/CreatureAI.cpp
diff options
context:
space:
mode:
authorccrs <ccrs@users.noreply.github.com>2018-06-03 10:06:57 -0700
committerGitHub <noreply@github.com>2018-06-03 10:06:57 -0700
commit982643cd96790ffc54e7a3e507469649f3b074d2 (patch)
tree90e65482d064fc9b2e8d0e215f2dec6e5fe663c9 /src/server/game/AI/CreatureAI.cpp
parentb84348f6fc7746349fdcbd443b32fe5483174442 (diff)
Core/Movement: MotionMaster reimplementation (#21888)
Internal structure and handling changes, nothing behavioural (or thats the intention at least).
Diffstat (limited to 'src/server/game/AI/CreatureAI.cpp')
-rw-r--r--src/server/game/AI/CreatureAI.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp
index 0686ad20c6e..1dd66d76996 100644
--- a/src/server/game/AI/CreatureAI.cpp
+++ b/src/server/game/AI/CreatureAI.cpp
@@ -157,9 +157,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)
@@ -173,8 +171,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
{