[Super-tux-commit] supertux/src badguy.cpp,1.68.2.1,1.68.2.2 player.cpp,1.88.2.1,1.88.2.2 world.cpp,
Brought to you by:
wkendrick
From: Ricardo C. <rm...@us...> - 2004-08-03 18:47:24
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16160/src Modified Files: Tag: supertux_0_1_1_branch badguy.cpp player.cpp world.cpp world.h Log Message: Bug fix: Ice blocks should now break full boxes. Index: player.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/player.cpp,v retrieving revision 1.88.2.1 retrieving revision 1.88.2.2 diff -u -d -r1.88.2.1 -r1.88.2.2 --- player.cpp 10 Jul 2004 21:53:08 -0000 1.88.2.1 +++ player.cpp 3 Aug 2004 18:47:15 -0000 1.88.2.2 @@ -228,7 +228,7 @@ World::current()->trygrabdistro(base.x, base.y - 32,BOUNCE); World::current()->trybumpbadguy(base.x, base.y - 64); - World::current()->trybreakbrick(base.x, base.y, size == SMALL); + World::current()->trybreakbrick(base.x, base.y, size == SMALL, dir); bumpbrick(base.x, base.y); World::current()->tryemptybox(base.x, base.y, RIGHT); @@ -241,7 +241,7 @@ World::current()->trybumpbadguy(base.x+ 31, base.y - 64); if(size == BIG) - World::current()->trybreakbrick(base.x+ 31, base.y, size == SMALL); + World::current()->trybreakbrick(base.x+ 31, base.y, size == SMALL, dir); bumpbrick(base.x+ 31, base.y); World::current()->tryemptybox(base.x+ 31, base.y, LEFT); @@ -622,6 +622,7 @@ void Player::collision(void* p_c_object, int c_object) { +return; BadGuy* pbad_c = NULL; switch (c_object) Index: world.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/Attic/world.h,v retrieving revision 1.39 retrieving revision 1.39.2.1 diff -u -d -r1.39 -r1.39.2.1 --- world.h 10 May 2004 13:21:41 -0000 1.39 +++ world.h 3 Aug 2004 18:47:15 -0000 1.39.2.1 @@ -107,7 +107,7 @@ void trygrabdistro(float x, float y, int bounciness); /** Try to break the brick at the given coordinates */ - void trybreakbrick(float x, float y, bool small); + void trybreakbrick(float x, float y, bool small, Direction col_side); /** Try to get the content out of a bonus box, thus emptying it */ void tryemptybox(float x, float y, Direction col_side); Index: world.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/Attic/world.cpp,v retrieving revision 1.73 retrieving revision 1.73.2.1 diff -u -d -r1.73 -r1.73.2.1 --- world.cpp 10 May 2004 19:06:03 -0000 1.73 +++ world.cpp 3 Aug 2004 18:47:15 -0000 1.73.2.1 @@ -579,7 +579,7 @@ /* Break a brick: */ void -World::trybreakbrick(float x, float y, bool small) +World::trybreakbrick(float x, float y, bool small, Direction col_side) { Level* plevel = get_level(); @@ -628,6 +628,8 @@ player_status.score = player_status.score + SCORE_BRICK; } } + else if(tile->fullbox) + tryemptybox(x, y, col_side); } /* Empty a box: */ Index: badguy.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/badguy.cpp,v retrieving revision 1.68.2.1 retrieving revision 1.68.2.2 diff -u -d -r1.68.2.1 -r1.68.2.2 --- badguy.cpp 18 Jul 2004 19:39:05 -0000 1.68.2.1 +++ badguy.cpp 3 Aug 2004 18:47:15 -0000 1.68.2.2 @@ -289,7 +289,7 @@ if (dir == LEFT && issolid( base.x, (int) base.y + halfheight)) { if (kind == BAD_MRICEBLOCK && mode == KICK) - World::current()->trybreakbrick(base.x, base.y + halfheight, false); + World::current()->trybreakbrick(base.x, base.y + halfheight, false, dir); dir = RIGHT; physic.set_velocity(-physic.get_velocity_x(), physic.get_velocity_y()); @@ -298,8 +298,8 @@ if (dir == RIGHT && issolid( base.x + base.width, (int)base.y + halfheight)) { if (kind == BAD_MRICEBLOCK && mode == KICK) - World::current()->trybreakbrick(base.x + base.width, (int) base.y + halfheight, false); - + World::current()->trybreakbrick(base.x + base.width, (int) base.y + halfheight, false, dir); + dir = LEFT; physic.set_velocity(-physic.get_velocity_x(), physic.get_velocity_y()); return; |