summaryrefslogtreecommitdiff
path: root/src/game-server/being.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game-server/being.cpp')
-rw-r--r--src/game-server/being.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game-server/being.cpp b/src/game-server/being.cpp
index e0b16ed7..6cbf4c31 100644
--- a/src/game-server/being.cpp
+++ b/src/game-server/being.cpp
@@ -88,7 +88,6 @@ int Being::damage(Object *, Damage const &damage)
LOG_DEBUG("Being " << getPublicID() << " suffered "<<HPloss<<" damage. HP: "<<HP.base + HP.mod<<"/"<<HP.base);
HP.mod -= HPloss;
modifiedAttribute(BASE_ATTR_HP);
- if (HP.base + HP.mod <= 0) died();
return HPloss;
}
@@ -237,4 +236,10 @@ void Being::update()
}
++i;
}
+
+ //check if being died
+ if (getModifiedAttribute(BASE_ATTR_HP) <= 0 && mAction != DEAD)
+ {
+ died();
+ }
}