From a1b7bd7b85d0a4be763664980f4a119d1737e9c0 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Thu, 2 Nov 2023 16:28:30 -0700 Subject: 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. --- src/game.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3