From 8d740f470fb5ed5f63a3d59d3867189626e285b9 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Sat, 21 Apr 2018 14:43:40 +0200 Subject: Corpses can take damage now. --- src/game/unit_nest.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/game/unit_nest.cpp') diff --git a/src/game/unit_nest.cpp b/src/game/unit_nest.cpp index a52574a..fe4a077 100644 --- a/src/game/unit_nest.cpp +++ b/src/game/unit_nest.cpp @@ -81,6 +81,19 @@ void unit_nest_t::on_spawn(void) void unit_nest_t::on_damage(unit_t *attacker) { + if (health < -30) { + assets::fx.gibbing.play_3d(x); + game->deletion_list.insert(this); + return; + } + + if (health <= 0) { + if (!dead) + assets::fx.corpse_hit.play_3d(x); + + return; + } + if (attacker) game->hivemind_alert(x, 12.0f, true, attacker->x); else -- cgit