From: Holger Schemel Date: Wed, 14 Feb 2024 18:08:57 +0000 (+0100) Subject: fixed sound volume (no sound positions) for native BD sound engine X-Git-Tag: 4.4.0.0-test-1~366 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=9de343a260b2c0623d82172a48fbdd5723d0a0ef;p=rocksndiamonds.git fixed sound volume (no sound positions) for native BD sound engine --- diff --git a/src/game_bd/bd_sound.c b/src/game_bd/bd_sound.c index 799ff44f..e43af91f 100644 --- a/src/game_bd/bd_sound.c +++ b/src/game_bd/bd_sound.c @@ -381,8 +381,8 @@ void gd_sound_play(GdCave *cave, GdSound sound, GdElement element, int x, int y) game_bd.game->state_counter == GAME_INT_CAVE_RUNNING) return; - // if no player position specified, use middle of the screen position - if (x == -1 && y == -1) + // when using native sound engine or if no position specified, use middle screen position + if (game.use_native_bd_sound_engine || (x == -1 && y == -1)) { x = get_play_area_w() / 2 + get_scroll_x(); y = get_play_area_h() / 2 + get_scroll_y();