From 7159afab99b130e7f3c5560765dded6c861f6c3b Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Fri, 13 Apr 2018 12:04:56 +0200 Subject: More sounds. --- src/game/unit_nest.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/game/unit_nest.cpp') diff --git a/src/game/unit_nest.cpp b/src/game/unit_nest.cpp index cae98f5..5890d34 100644 --- a/src/game/unit_nest.cpp +++ b/src/game/unit_nest.cpp @@ -68,6 +68,7 @@ void unit_nest_t::on_think(void) return; spawn_spider(game, x); + assets::nest.spawn.play_3d(x); next_spawning = game->now + game->prng.next_float() * 10 + 5; } @@ -78,10 +79,19 @@ void unit_nest_t::on_spawn(void) spawn_spider(game, x); } +void unit_nest_t::on_damage(unit_t *attacker) +{ + if (attacker) + hivemind_attack(this, attacker->x); + + assets::nest.pain.play_3d(x); +} + void unit_nest_t::on_death(void) { render_layer = render::LAYER_FLAT; cmodel.cflags = CF_BACKGROUND; + assets::nest.death.play_3d(x); } void unit_nest_t::render_to(render::state_t *render) -- cgit