From 759712a08d75508ce1b834397ddc5ca0eb0cf973 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tobias=20Gl=C3=A4=C3=9Fer?= Date: Tue, 3 Feb 2004 12:32:49 +0000 Subject: [PATCH] Fixed level end position bug. The FIXME: Under.... bug doesn't hang up in a loop anymore at least. SVN-Revision: 118 --- src/player.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; } -- 2.11.0