[Super-tux-commit] supertux/src badguy.cpp,1.129,1.130
Brought to you by:
wkendrick
From: Ricardo C. <rm...@us...> - 2004-10-19 17:54:34
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7568/src Modified Files: badguy.cpp Log Message: Bugfix: Jumpy and Flying Snowball faced player even when dead. Bug reported by Marek. Index: badguy.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/badguy.cpp,v retrieving revision 1.129 retrieving revision 1.130 diff -u -d -r1.129 -r1.130 --- badguy.cpp 19 Oct 2004 16:27:49 -0000 1.129 +++ badguy.cpp 19 Oct 2004 17:54:24 -0000 1.130 @@ -520,10 +520,13 @@ } // set direction based on tux - if(tux.base.x > base.x) - dir = RIGHT; - else - dir = LEFT; + if(dying == DYING_NOT) + { + if(tux.base.x > base.x) + dir = RIGHT; + else + dir = LEFT; + } // move physic.apply(elapsed_time, base.x, base.y, Sector::current()->gravity); @@ -742,11 +745,14 @@ if(dying == DYING_NOT || dying == DYING_SQUISHED) collision_swept_object_map(&old_base, &base); - // set direction based on tux - if(Sector::current()->player->base.x > base.x) - dir = RIGHT; - else - dir = LEFT; + if(dying == DYING_NOT) + { + // set direction based on tux + if(Sector::current()->player->base.x > base.x) + dir = RIGHT; + else + dir = LEFT; + } // Handle dying timer: if (dying == DYING_SQUISHED && !timer.check()) |