From c2d27b084e7672008bd6c71445d755aeba527fcd Mon Sep 17 00:00:00 2001 From: Ricardo Cruz Date: Mon, 24 May 2004 21:52:14 +0000 Subject: [PATCH] Small fix. Don't do back scrolling, in case it is unabled. And don't do vertical scrolling when there are 19 height tiles. It is necessary to explecity say so cause in this case, the actual height of the level is 608, higher than the screen (600). SVN-Revision: 1314 --- src/camera.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/camera.cpp b/src/camera.cpp index 1db1c9dab..2c145dafb 100644 --- a/src/camera.cpp +++ b/src/camera.cpp @@ -82,7 +82,7 @@ Camera::scroll_normal(float elapsed_time) bool do_y_scrolling = true; - if(player->dying) + if(player->dying || level->height == 19) do_y_scrolling = false; if(do_y_scrolling) { @@ -115,7 +115,7 @@ Camera::scroll_normal(float elapsed_time) if((player->dir == ::LEFT && scrollchange == RIGHT) || (player->dir == ::RIGHT && scrollchange == LEFT)) scrollchange = NONE; - if(player->base.x < translation.x + screen->w/3) + if(player->base.x < translation.x + screen->w/3 && level->back_scrolling) scrollchange = LEFT; else if(player->base.x > translation.x + screen->w/3*2) scrollchange = RIGHT; -- 2.11.0