From fe8f6dfadf17dca308259422feb776a93ded756e Mon Sep 17 00:00:00 2001 From: Ricardo Cruz Date: Fri, 28 May 2004 23:09:37 +0000 Subject: [PATCH] Added the 16 margin to the camera move checking as suggested by Ryan. I still prefer no value, but at least it is not as bad as 32. SVN-Revision: 1358 --- src/camera.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/camera.cpp b/src/camera.cpp index bef202dfb..3fdf3ac4e 100644 --- a/src/camera.cpp +++ b/src/camera.cpp @@ -202,10 +202,10 @@ Camera::scroll_normal(float elapsed_time) || (player->dir == ::RIGHT && scrollchange == LEFT)) scrollchange = NONE; // when in left 1/3rd of screen scroll left - if(player->base.x < translation.x + screen->w/3 && do_backscrolling) + if(player->base.x < translation.x + screen->w/3 - 16 && do_backscrolling) scrollchange = LEFT; // scroll right when in right 1/3rd of screen - else if(player->base.x > translation.x + screen->w/3*2) + else if(player->base.x > translation.x + screen->w/3*2 + 16) scrollchange = RIGHT; // calculate our scroll target depending on scroll mode -- 2.11.0