diff options
author | megamage <none@none> | 2009-03-13 17:48:57 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-13 17:48:57 -0600 |
commit | ce4c9cb2aeca0000e6ec7cccf5ae0951ad1e1266 (patch) | |
tree | 67b9a31ea40fce6f8c6b2193a584697b018211ae /src/game/CreatureAI.cpp | |
parent | 5f2edfc7e899d7c6997e679f1b9737fb5e7e8d4d (diff) |
*Allow not to switch to charmed AI for some scripts.
--HG--
branch : trunk
Diffstat (limited to 'src/game/CreatureAI.cpp')
-rw-r--r-- | src/game/CreatureAI.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game/CreatureAI.cpp b/src/game/CreatureAI.cpp index 2d7eeeb18ff..9d9a3fc3a63 100644 --- a/src/game/CreatureAI.cpp +++ b/src/game/CreatureAI.cpp @@ -63,7 +63,12 @@ void UnitAI::DoMeleeAttackIfReady() void PlayerAI::OnCharmed(bool apply) { me->IsAIEnabled = apply; } //Disable CreatureAI when charmed -void CreatureAI::OnCharmed(bool apply) { /*me->IsAIEnabled = !apply;*/ } +void CreatureAI::OnCharmed(bool apply) +{ + //me->IsAIEnabled = !apply;*/ + me->NeedChangeAI = true; + me->IsAIEnabled = false; +} void CreatureAI::MoveInLineOfSight(Unit *who) { |