From 11999dbea71bb77715dfb21b82e37b6a6eb4a435 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Tue, 14 Jan 2025 23:32:24 +0100 Subject: [PATCH] fixed playing/stopping sounds while covering screen when using BD engine --- src/game_bd/bd_gameplay.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/game_bd/bd_gameplay.c b/src/game_bd/bd_gameplay.c index 44829715..791711e4 100644 --- a/src/game_bd/bd_gameplay.c +++ b/src/game_bd/bd_gameplay.c @@ -580,7 +580,6 @@ static GdGameState gd_game_main_int(GdGame *game, boolean allow_iterate, boolean else if (game->state_counter == GAME_INT_COVER_START) { // starting to cover. start cover sound. - gd_cave_clear_sounds(game->cave); gd_sound_play(game->cave, GD_S_COVERING, O_COVERED, -1, -1); @@ -596,6 +595,9 @@ static GdGameState gd_game_main_int(GdGame *game, boolean allow_iterate, boolean // covering. gd_sound_play(game->cave, GD_S_COVERING, O_COVERED, -1, -1); + // to play cover sound + gd_sound_play_cave(game->cave); + counter_next = game->state_counter; if (frame) @@ -621,9 +623,7 @@ static GdGameState gd_game_main_int(GdGame *game, boolean allow_iterate, boolean counter_next = game->state_counter + 1; return_state = GD_GAME_NOTHING; - // to stop uncover sound. - gd_cave_clear_sounds(game->cave); - gd_sound_play_cave(game->cave); + // do not stop cover sound here; uncovering (with same sound) may immediately follow } else { -- 2.34.1