summaryrefslogtreecommitdiff
path: root/src/game-server
diff options
context:
space:
mode:
Diffstat (limited to 'src/game-server')
-rw-r--r--src/game-server/monster.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game-server/monster.cpp b/src/game-server/monster.cpp
index ed7048e2..d2267412 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;