From: Holger Schemel Date: Tue, 17 Dec 2024 19:16:56 +0000 (+0100) Subject: fixed playing time bonus sound in BD engine with R'n'D sound engine X-Git-Tag: 4.4.0.0~8 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=5a97f9032d2b98d293580f224db8691586f2558f;p=rocksndiamonds.git fixed playing time bonus sound in BD engine with R'n'D sound engine Without this addition, no time bonus sound is played while counting down the last few seconds after a game is won, using the native BD game engine while using the non-native (R'n'D) sound engine. --- diff --git a/src/game_bd/bd_caveengine.c b/src/game_bd/bd_caveengine.c index 01e160c1..ba4aa4c8 100644 --- a/src/game_bd/bd_caveengine.c +++ b/src/game_bd/bd_caveengine.c @@ -326,7 +326,14 @@ void gd_cave_set_seconds_sound(GdCave *cave) // also skip timeout sounds when not using native sound engine if (game_bd.game == NULL || game_bd.game->state_counter != GAME_INT_CHECK_BONUS_TIME || !game.use_native_bd_sound_engine) + { + // needed to play sound during last seconds of counting bonus time with non-native sounds + if (game_bd.game != NULL && game_bd.game->state_counter == GAME_INT_CHECK_BONUS_TIME && + !game.use_native_bd_sound_engine) + gd_sound_play(cave, GD_S_FINISHED, O_NONE, -1, -1); + return; + } // this is an integer division, so 0 seconds can be 0.5 seconds... // also, when this reaches 8, the player still has 8.9999 seconds.