X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=f4ae9303776da68ac2be4439c6b5ff651be2fe59;hb=8bf81088836952a4f0263281560ef2127435e4b2;hp=4f7f613787a791e589a81ae3c838ea8920d300f4;hpb=11cc6689f6aa7397e1b5165c7fc4147c03fc09c3;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index 4f7f6137..f4ae9303 100644 --- a/src/game.c +++ b/src/game.c @@ -4396,6 +4396,9 @@ void UpdateEngineValues(int actual_scroll_x, int actual_scroll_y, if (level.game_engine_type == GAME_ENGINE_TYPE_EM) { + actual_scroll_x = correctLevelPosX_EM(actual_scroll_x); + actual_scroll_y = correctLevelPosY_EM(actual_scroll_y); + actual_player_x = correctLevelPosX_EM(actual_player_x); actual_player_y = correctLevelPosY_EM(actual_player_y); } @@ -14858,9 +14861,12 @@ static void PlayLevelMusic(void) void PlayLevelSound_EM(int xx, int yy, int element_em, int sample) { int element = (element_em > -1 ? map_element_EM_to_RND_game(element_em) : 0); - int offset = (BorderElement == EL_STEELWALL ? 1 : 0); - int x = xx - 1 - offset; - int y = yy - 1 - offset; + int offset = 0; + int x = xx - offset; + int y = yy - offset; + + x = correctLevelPosX_EM(x); + y = correctLevelPosY_EM(y); switch (sample) {