[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/actions bomber.cxx,1.24,1.25 faller.c
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/actions bomber.cxx,1.24,1.25 faller.cxx,1.32,1.33 |
Date: |
3 Nov 2002 17:32:27 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/actions
In directory dark:/tmp/cvs-serv17725/actions
Modified Files:
bomber.cxx faller.cxx
Log Message:
some more cleanup
Index: bomber.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bomber.cxx,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- bomber.cxx 3 Nov 2002 14:37:20 -0000 1.24
+++ bomber.cxx 3 Nov 2002 17:32:25 -0000 1.25
@@ -79,6 +79,7 @@
{
sprite.update ();
+ // Do something according to the action that was in use before
switch (pingu->get_previous_action())
{
case Actions::Faller:
Index: faller.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/faller.cxx,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- faller.cxx 3 Nov 2002 13:29:09 -0000 1.32
+++ faller.cxx 3 Nov 2002 17:32:25 -0000 1.33
@@ -35,8 +35,7 @@
faller(Sprite("Pingus/faller" + to_string(pingu->get_owner ()), "pingus")),
// FIXME: we can save some cpu cycles & memory if we do this when it
// is necessary
- tumbler(Sprite("Pingus/tumble" + to_string(pingu->get_owner()), "pingus")),
- falling(0)
+ tumbler(Sprite("Pingus/tumble" + to_string(pingu->get_owner()), "pingus"))
{
faller .set_align_center_bottom();
tumbler.set_align_center_bottom();
@@ -58,7 +57,8 @@
}
// FIXME: This should be triggered at a later point, when close to
- // FIXME: deadly_velocity or something like that
+ // FIXME: deadly_velocity or something like that. A translation
+ // FIXME: animation for the floater might also help
if (pingu->get_velocity().y > 5.0 && pingu->request_fall_action())
return;
@@ -68,15 +68,8 @@
// Now that the Pingu is moved, check if he hits the ground.
// FIXME: shouldn't this be done by move_with_forces
- if (rel_getpixel(0, -1) == Groundtype::GP_NOTHING)
- { // if pingu is not on ground
- ++falling;
-
- //if (falling > 3) //FIXME: insert floater check here
- //pingu->environment = ENV_AIR;
- }
- else // Ping is on ground/water/something
- {
+ if (rel_getpixel(0, -1) != Groundtype::GP_NOTHING)
+ { // Ping is on ground/water/something
if ( rel_getpixel(0, -1) == Groundtype::GP_WATER
|| rel_getpixel(0, -1) == Groundtype::GP_LAVA)
{
@@ -97,8 +90,6 @@
pout(PINGUS_DEBUG_ACTIONS) << "Pingu: x Smashed on ground,
jumping" << std::endl;
}
}
- // Reset the velocity
- pingu->set_velocity(Vector(-(pingu->get_velocity().x/3), 0));
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/actions bomber.cxx,1.24,1.25 faller.cxx,1.32,1.33,
grumbel <=