diff options
author | David Athay <ko2fan@gmail.com> | 2009-05-26 13:51:08 +0100 |
---|---|---|
committer | David Athay <ko2fan@gmail.com> | 2009-05-26 13:51:08 +0100 |
commit | 3c7c7df5572fb136a1c4f75c4ed558dd80f472d5 (patch) | |
tree | 747706e157c4a82b2aa370e48abd24b11a6eb267 /src/game-server/monster.cpp | |
parent | 509d0a5cd64e37c5f6397ce20b4aef877b604e18 (diff) | |
download | manaserv-3c7c7df5572fb136a1c4f75c4ed558dd80f472d5.tar.gz manaserv-3c7c7df5572fb136a1c4f75c4ed558dd80f472d5.tar.xz manaserv-3c7c7df5572fb136a1c4f75c4ed558dd80f472d5.zip |
Fix target bugs.
Diffstat (limited to 'src/game-server/monster.cpp')
-rw-r--r-- | src/game-server/monster.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game-server/monster.cpp b/src/game-server/monster.cpp index ed7048e..d226741 100644 --- a/src/game-server/monster.cpp +++ b/src/game-server/monster.cpp @@ -111,7 +111,7 @@ Monster::~Monster() void Monster::perform() { - if (mAction == ATTACK && mCurrentAttack) + if (mAction == ATTACK && mCurrentAttack && mTarget) { if (mAttackTime == mCurrentAttack->aftDelay) { @@ -160,7 +160,7 @@ void Monster::update() } // Check potential attack positions - Being *bestAttackTarget = NULL; + Being *bestAttackTarget = mTarget = NULL; int bestTargetPriority = 0; Point bestAttackPosition; Direction bestAttackDirection = DIRECTION_DOWN; |