X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fgame_em%2Fgraphics.c;fp=src%2Fgame_em%2Fgraphics.c;h=7f303a2a6510b78fda2ae33728a6037669e5cf6d;hp=19000a7de764047c836a1e6b2e943ccab698cf8a;hb=5eec6f3a02cb8a6171a37a209aae3e3665aff514;hpb=0674fef44ec688158f1501b51371d53983ac96bb diff --git a/src/game_em/graphics.c b/src/game_em/graphics.c index 19000a7d..7f303a2a 100644 --- a/src/game_em/graphics.c +++ b/src/game_em/graphics.c @@ -446,6 +446,14 @@ static void blitplayer(int nr) ply[nr].x = (ply[nr].x < lev.left ? lev.right - 1 : lev.left); ply[nr].prev_x = ply[nr].x - dx; + if (!lev.infinite_true) + { + int dy = ply[nr].y - ply[nr].prev_y; + + ply[nr].y += (ply[nr].x == lev.left ? 1 : -1); + ply[nr].prev_y = ply[nr].y - dy; + } + /* draw player entering playfield from the opposite side */ blitplayer_ext(nr); @@ -666,8 +674,11 @@ void RedrawPlayfield_EM(boolean force_redraw) if (draw_new_player_location_wrap) { - // when wrapping around (horizontally), keep vertical player position - screen_yy = screen_y; + if (lev.infinite_true) + { + // when wrapping around (horizontally), keep vertical player position + screen_yy = screen_y; + } // scrolling for wrapping should be faster than for switching players wait_delay_value /= 4;