summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-12-19 13:56:59 +0100
committerPaweł Redman <pawel.redman@gmail.com>2017-12-19 13:56:59 +0100
commite29c796801dd6b7a406ef457c0c68b4a1c7f527a (patch)
tree5a2a25ff720f4145a4cd6181c14fb3fb207d988d /src
parentc1f1b86e51308bf73c528eafc89a7e6e65dbd95b (diff)
Make units die also when the health is exactly zero.
Diffstat (limited to 'src')
-rw-r--r--src/game/units.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/units.cpp b/src/game/units.cpp
index 92e865b..e310026 100644
--- a/src/game/units.cpp
+++ b/src/game/units.cpp
@@ -185,7 +185,7 @@ void unit_t::damage(int points, unit_t *attacker)
blood->place(&game->world);
health -= points;
- if (health < 0)
+ if (health <= 0)
die(attacker);
}