[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.22,1.23 faller.c
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/actions bomber.cxx,1.22,1.23 faller.cxx,1.31,1.32 |
Date: |
3 Nov 2002 13:29:11 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/actions
In directory dark:/tmp/cvs-serv7727/actions
Modified Files:
bomber.cxx faller.cxx
Log Message:
- some minor bugfixes
- move_with_forces() needs quite a lot of cleanup
- faller is broken, it doesn't die
Index: bomber.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bomber.cxx,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- bomber.cxx 22 Oct 2002 00:07:56 -0000 1.22
+++ bomber.cxx 3 Nov 2002 13:29:09 -0000 1.23
@@ -80,10 +80,8 @@
{
sprite.update ();
- // Move the Bomber according to the forces that currently exist, subtracting
- // the velocity due to the fact that the Pingu is ballooning up. Best to
- // make it -1.0 so that exploding Walkers etc... remain "stationary."
- move_with_forces (0.0, -1.0);
+ if (pingu->get_previous_action() == Actions::Faller)
+ move_with_forces();
// If the Bomber hasn't 'exploded' yet and it has hit Water or Lava
if (sprite.get_frame () <= 9 && (rel_getpixel(0, -1) == Groundtype::GP_WATER
Index: faller.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/faller.cxx,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- faller.cxx 20 Oct 2002 18:28:49 -0000 1.31
+++ faller.cxx 3 Nov 2002 13:29:09 -0000 1.32
@@ -64,9 +64,10 @@
// Move the Faller according to the forces that currently exist, which
// includes gravity.
- move_with_forces (0.0, 0.0);
+ move_with_forces ();
// 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;
@@ -77,13 +78,14 @@
else // Ping is on ground/water/something
{
if ( rel_getpixel(0, -1) == Groundtype::GP_WATER
- || rel_getpixel(0, -1) == Groundtype::GP_LAVA)
+ || rel_getpixel(0, -1) == Groundtype::GP_LAVA)
{
pingu->set_action(Actions::Drown);
return;
}
else
{
+ std::cout << "Ground hit velocity: " <<
fabs(pingu->get_velocity().y) << "/" << deadly_velocity << std::endl;
// Did we stop too fast?
if (fabs(pingu->get_velocity().y) > deadly_velocity)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/actions bomber.cxx,1.22,1.23 faller.cxx,1.31,1.32,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src pingus_main.cxx,1.32,1.33 screen_manager.cxx,1.24,1.25 sound.cxx,1.6,1.7 sound.hxx,1.8,1.9 sound_real.cxx,1.8,1.9 sound_real.hxx,1.6,1.7
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs entrance.cxx,1.7,1.8
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src pingus_main.cxx,1.32,1.33 screen_manager.cxx,1.24,1.25 sound.cxx,1.6,1.7 sound.hxx,1.8,1.9 sound_real.cxx,1.8,1.9 sound_real.hxx,1.6,1.7
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs entrance.cxx,1.7,1.8
- Index(es):