aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrobinsch <robin.schriever.hude@web.de>2015-07-07 10:32:49 +0200
committerrobinsch <robin.schriever.hude@web.de>2015-07-07 10:32:49 +0200
commit2b3ea2e1819839895091e0e8c1777dba4bc240a8 (patch)
tree35998cb6d46f0d1e133774af3cfbf8d58a0e0585
parent23e4472d14bbf24722277d9d49c62ea7e39821c7 (diff)
SmartAI: Fixed a bug where creatures would clear movement flags when they shouldn't at SetCombatMove.
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 21a15fa4f99..0b040fc519a 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -763,6 +763,9 @@ void SmartAI::SetCombatMove(bool on)
}
else
{
+ if (me->HasUnitState(UNIT_STATE_CONFUSED_MOVE | UNIT_STATE_FLEEING_MOVE))
+ return;
+
me->GetMotionMaster()->MovementExpired();
me->GetMotionMaster()->Clear(true);
me->StopMoving();