X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_bd%2Fbd_sound.c;h=e43af91fd75220eef348b974a62cdf079221bede;hb=9de343a260b2c0623d82172a48fbdd5723d0a0ef;hp=799ff44fa44c8789434c0f6872529fa154beb412;hpb=bbe2d057fa5fb7fe2eb5e0d96079ad850ab4d3b3;p=rocksndiamonds.git 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();