Update of /cvsroot/super-tux/supertux/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28542/src
Modified Files:
scene.cpp special.cpp
Log Message:
Ice bullets now bump off walls
Fixed typo in scene.cpp
Index: scene.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/scene.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- scene.cpp 21 May 2004 00:22:57 -0000 1.29
+++ scene.cpp 8 Jun 2004 13:23:17 -0000 1.30
@@ -50,7 +50,7 @@
case PlayerStatus::GROWUP_BONUS:
return "growup";
case PlayerStatus::FLOWER_BONUS:
- return "icflower";
+ return "iceflower";
default:
return "none";
}
Index: special.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/special.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- special.cpp 4 Jun 2004 14:14:59 -0000 1.55
+++ special.cpp 8 Jun 2004 13:23:17 -0000 1.56
@@ -51,6 +51,9 @@
life_count = 3;
base.width = 4;
base.height = 4;
+
+ if (kind == ICE_BULLET)
+ life_count = 6; //ice-bullets get "extra lives" for bumping off walls
if (dir == RIGHT)
{
@@ -102,12 +105,20 @@
base.x > scroll_x + screen->w ||
base.y < scroll_y ||
base.y > scroll_y + screen->h ||
- issolid(base.x + 4, base.y + 2) ||
- issolid(base.x, base.y + 2) ||
life_count <= 0)
{
remove_me();
}
+ if (issolid(base.x + 4, base.y + 2) ||
+ issolid(base.x, base.y + 2))
+ {
+ if (kind == FIRE_BULLET)
+ remove_me();
+ else if (kind == ICE_BULLET)
+ {
+ physic.set_velocity_x(physic.get_velocity_x() * -1);
+ }
+ }
}
void
|