From da4a28a319f7dc15ea109c6bdf8da2483f67dbdb Mon Sep 17 00:00:00 2001 From: Ryan Flegel Date: Wed, 5 May 2004 04:04:05 +0000 Subject: [PATCH] - fixed scrolling past level bug SVN-Revision: 989 --- src/world.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/world.cpp b/src/world.cpp index 704534062..00b075a4b 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -371,8 +371,8 @@ void World::scrolling(double frame_ratio) // this code prevent the screen to scroll before the start or after the level's end if(scroll_x < 0) scroll_x = 0; - if(scroll_x > (level->width-1) * 32) - scroll_x = (level->width-1) * 32; + if(scroll_x > level->width * 32 - screen->w) + scroll_x = level->width * 32 - screen->w; } void -- 2.11.0