From: Ricardo Cruz Date: Sat, 8 May 2004 14:57:07 +0000 (+0000) Subject: Small clean-up. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=f1a8a0250dd43069b10c4463f9dbc2ed52c1749d;p=supertux.git Small clean-up. SVN-Revision: 1045 --- diff --git a/src/player.cpp b/src/player.cpp index 7388100a8..25e144047 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -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; + } }