From: Tobias Gläßer Date: Tue, 3 Feb 2004 12:32:49 +0000 (+0000) Subject: Fixed level end position bug. The FIXME: Under.... bug doesn't hang up in a loop... X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=759712a08d75508ce1b834397ddc5ca0eb0cf973;p=supertux.git Fixed level end position bug. The FIXME: Under.... bug doesn't hang up in a loop anymore at least. SVN-Revision: 118 --- diff --git a/src/player.c b/src/player.c index bacbe30bd..b10a33466 100644 --- a/src/player.c +++ b/src/player.c @@ -189,10 +189,13 @@ void player_action(player_type* pplayer) { ++debug_int; if(debug_int > 32) + { DEBUG_MSG("FIXME - UNDER certain circumstances I'm hanging in a loop here!"); - /*the circumstances are: + /*the circumstances are: issolid() is true and base.ym == 0 use of floating point varibles for base stuff*/ + break; + } if (pplayer->base.ym < 0) pplayer->base.y++; else if (pplayer->base.ym > 0) @@ -477,7 +480,7 @@ void player_action(player_type* pplayer) /* End of level? */ - if (pplayer->base.x>= endpos && endpos != 0) + if (pplayer->base.x - scroll_x >= endpos && endpos != 0) { next_level = 1; }