From: Holger Schemel Date: Sat, 18 Jan 2025 11:28:15 +0000 (+0100) Subject: fixed bug with looping death sound when killed by voodoo in BD engine X-Git-Tag: 4.4.0.1~3 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=b8a45845c38a9b29696495fce334aae1215a1273;p=rocksndiamonds.git fixed bug with looping death sound when killed by voodoo in BD engine --- 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.