Small clean-up.
authorRicardo Cruz <rick2@aeiou.pt>
Sat, 8 May 2004 14:57:07 +0000 (14:57 +0000)
committerRicardo Cruz <rick2@aeiou.pt>
Sat, 8 May 2004 14:57:07 +0000 (14:57 +0000)
SVN-Revision: 1045

src/player.cpp

index 7388100..25e1440 100644 (file)
@@ -756,13 +756,15 @@ Player::check_bounds(bool back_scrolling, bool hor_autoscroll)
   if(base.x < scroll_x && (!back_scrolling || hor_autoscroll))  // can happen if back scrolling is disabled
     base.x = scroll_x;
 
-  if(base.x == scroll_x && hor_autoscroll)
-    if(issolid(base.x+32, base.y) || (size != SMALL && issolid(base.x+32, base.y+32)))
-      kill(KILL);
-
-  if(base.x + base.width > scroll_x + screen->w && hor_autoscroll)
-    base.x = scroll_x + screen->w - base.width;
+  if(hor_autoscroll)
+    {
+    if(base.x == scroll_x)
+      if(issolid(base.x+32, base.y) || (size != SMALL && issolid(base.x+32, base.y+32)))
+        kill(KILL);
 
+    if(base.x + base.width > scroll_x + screen->w)
+      base.x = scroll_x + screen->w - base.width;
+    }
     
 }