summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-11-02 16:28:30 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-11-02 16:28:30 -0700
commita1b7bd7b85d0a4be763664980f4a119d1737e9c0 (patch)
tree2b4b1e4607f1810a59c16cc78caaba3955b36934 /src
parentf95815ef0445647ab2ca0ca3e5b0a6f5bbcf118b (diff)
game: vary infected baby sfx volume with distance
This is an especially welcome improvement to the late game situation where infections are constantly happening, but in general I think it's better to have the baby scream less loud most of the time.
Diffstat (limited to 'src')
-rw-r--r--src/game.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game.c b/src/game.c
index a9ffb67..02fbb0d 100644
--- a/src/game.c
+++ b/src/game.c
@@ -435,7 +435,7 @@ static void infect_entity(game_t *game, entity_t *entity, const char *name)
{
/* convert entity into inanimate virus (off the viruses array) */
(void) virus_node_new(&(stage_conf_t){ .stage = entity->any.node, .replace = 1, .name = name, .active = 1, .alpha = 1.f }, &game->sars->projection_x, &entity->any.model_x);
- sfx_play(&sfx.baby_infected, 1.f);
+ sfx_play(&sfx.baby_infected, entity_volume(game, &entity->any));
entity->any.type = ENTITY_TYPE_VIRUS;
entity->virus.corpse = 1;
© All Rights Reserved