[Super-tux-commit] supertux/src badguy.cpp,1.63,1.64 player.cpp,1.80,1.81
Brought to you by:
wkendrick
From: Ingo R. <gr...@us...> - 2004-05-01 15:46:18
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1363 Modified Files: badguy.cpp player.cpp Log Message: - improved verboseness of badguy in wall error message - fixed bug that caused tux to only high jump to the right Index: player.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/player.cpp,v retrieving revision 1.80 retrieving revision 1.81 diff -u -d -r1.80 -r1.81 --- player.cpp 1 May 2004 10:12:08 -0000 1.80 +++ player.cpp 1 May 2004 15:46:08 -0000 1.81 @@ -378,7 +378,7 @@ if (on_ground()) { // jump higher if we are running - if (physic.get_velocity_x() > MAX_WALK_XM) + if (fabs(physic.get_velocity_x()) > MAX_WALK_XM) physic.set_velocity_y(5.8); else physic.set_velocity_y(5.2); Index: badguy.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/badguy.cpp,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- badguy.cpp 30 Apr 2004 07:25:37 -0000 1.63 +++ badguy.cpp 1 May 2004 15:46:08 -0000 1.64 @@ -193,11 +193,13 @@ } // if we're in a solid tile at start correct that now - if(kind != BAD_FLAME && kind != BAD_FISH && collision_object_map(base)) { - printf("Warning: badguy started in wall!.\n"); - while(collision_object_map(base)) - --base.y; - } + if(kind != BAD_FLAME && kind != BAD_FISH && collision_object_map(base)) + { + std::cout << "Warning: badguy started in wall: kind: " << badguykind_to_string(kind) + << " pos: (" << base.x << ", " << base.y << ")" << std::endl; + while(collision_object_map(base)) + --base.y; + } } void |