From b8a45845c38a9b29696495fce334aae1215a1273 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sat, 18 Jan 2025 12:28:15 +0100 Subject: [PATCH] fixed bug with looping death sound when killed by voodoo in BD engine --- src/game_bd/bd_caveengine.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/game_bd/bd_caveengine.c b/src/game_bd/bd_caveengine.c index 7e79685e..17acfafc 100644 --- a/src/game_bd/bd_caveengine.c +++ b/src/game_bd/bd_caveengine.c @@ -4168,9 +4168,10 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire, if (cave->kill_player || (cave->player_state == GD_PL_LIVING && cave->player_seen_ago > cave->player_seen_ago_limit)) { - cave->player_state = GD_PL_DIED; + if (cave->player_state != GD_PL_DIED) + gd_sound_play(cave, GD_S_DYING, O_PLAYER, -1, -1); - gd_sound_play(cave, GD_S_DYING, O_PLAYER, -1, -1); + cave->player_state = GD_PL_DIED; } // check if any voodoo exploded, and kill players the next scan if that happended. -- 2.34.1