diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2018-04-21 14:43:40 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2018-04-21 14:43:40 +0200 |
commit | 8d740f470fb5ed5f63a3d59d3867189626e285b9 (patch) | |
tree | 30123091126a86c82f081de10f3ec7e0f92a0a6c /src/game/units.cpp | |
parent | 7c56f59aedddb6bb18d85e778a3acbef16b4c54f (diff) |
Corpses can take damage now.
Diffstat (limited to 'src/game/units.cpp')
-rw-r--r-- | src/game/units.cpp | 7 |
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: |