summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/defines.h2
-rw-r--r--src/game-server/monster.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/defines.h b/src/defines.h
index 19909b33..b256df20 100644
--- a/src/defines.h
+++ b/src/defines.h
@@ -149,7 +149,7 @@ enum {
GPMSG_BEING_HEALTH_CHANGE = 0x0274, // W being id, W health
GPMSG_BEINGS_MOVE = 0x0280, // { W being id, B flags [, C position, B speed] [, W*2 destination] }*
GPMSG_ITEMS = 0x0281, // { W item id, W*2 position }*
- PGMSG_ATTACK = 0x0290, // B direction
+ PGMSG_ATTACK = 0x0290, // W being id
GPMSG_BEING_ATTACK = 0x0291, // W being id, B direction, B attacktype
PGMSG_USE_SPECIAL = 0x0292, // B specialID
PGMSG_SAY = 0x02A0, // S text
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;