summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-05-01 20:17:43 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-05-01 20:17:43 +0000
commitb895630aa394f74e07dc0eb3f230ae943ba86d22 (patch)
tree8d6480857f0c369f67974b208bfb7efe54f582c1 /src/being.cpp
parent328bd58d13177368a17bcf486c0aba63184bf478 (diff)
downloadmana-b895630aa394f74e07dc0eb3f230ae943ba86d22.tar.gz
mana-b895630aa394f74e07dc0eb3f230ae943ba86d22.tar.bz2
mana-b895630aa394f74e07dc0eb3f230ae943ba86d22.tar.xz
mana-b895630aa394f74e07dc0eb3f230ae943ba86d22.zip
Fixed width of item lists in shops and fixed hitting dead monsters.
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 90819f70..3ddbeac9 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -107,10 +107,9 @@ unsigned int findMonster(unsigned short x, unsigned short y)
std::list<Being*>::iterator i;
for (i = beings.begin(); i != beings.end(); i++) {
Being *being = (*i);
- // Check if is a MONSTER
- if (being->job > 200 &&
- being->x == x &&
- being->y == y)
+ // Check if is a MONSTER that is alive
+ if (being->job > 200 && being->x == x && being->y == y &&
+ being->action != MONSTER_DEAD)
{
return being->id;
}
@@ -135,7 +134,8 @@ Being *findNode(unsigned short x, unsigned short y)
std::list<Being*>::iterator i;
for (i = beings.begin(); i != beings.end(); i++) {
Being *being = (*i);
- if (being->x == x && being->y == y) {
+ // Return being if found and it is not a dead monster
+ if (being->x == x && being->y == y && being->action != MONSTER_DEAD) {
return being;
}
}