Update of /cvsroot/super-tux/supertux/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6096
Modified Files:
world.cpp
Log Message:
- fixed scrolling past level bug
Index: world.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/world.cpp,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- world.cpp 5 May 2004 02:59:27 -0000 1.60
+++ world.cpp 5 May 2004 04:04:05 -0000 1.61
@@ -371,8 +371,8 @@
// 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
|