From: Holger Schemel Date: Tue, 14 Jan 2025 22:32:24 +0000 (+0100) Subject: fixed playing/stopping sounds while covering screen when using BD engine X-Git-Tag: 4.4.0.1~13 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=11999dbea71bb77715dfb21b82e37b6a6eb4a435;p=rocksndiamonds.git fixed playing/stopping sounds while covering screen when using BD engine --- 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 {