summaryrefslogtreecommitdiff
path: root/src/game/units.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/units.cpp')
-rw-r--r--src/game/units.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/game/units.cpp b/src/game/units.cpp
index f1ee45e..c4bc8de 100644
--- a/src/game/units.cpp
+++ b/src/game/units.cpp
@@ -191,12 +191,9 @@ void unit_t::damage(int points, unit_t *attacker)
bool alien;
health -= points;
- if (health <= 0)
+ on_damage(attacker);
+ if (health <= 0 && !dead)
die(attacker);
- else {
- wake();
- on_damage(attacker);
- }
switch (type) {
case UNIT_SOLDIER: