pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] CVS: Games/Pingus/src pingu_action.cxx,1.16,1.17


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src pingu_action.cxx,1.16,1.17
Date: 3 Nov 2002 20:30:40 -0000

Update of /usr/local/cvsroot/Games/Pingus/src
In directory dark:/tmp/cvs-serv24840

Modified Files:
        pingu_action.cxx 
Log Message:
quick&dirty workaround to kill fallers, move_with_forces() doesn't really work 
in its current state

Index: pingu_action.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu_action.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- pingu_action.cxx    3 Nov 2002 17:32:25 -0000       1.16
+++ pingu_action.cxx    3 Nov 2002 20:30:38 -0000       1.17
@@ -25,6 +25,7 @@
 #include "pingu.hxx"
 #include "pingu_action.hxx"
 #include "worldobj.hxx"
+#include "actions/faller.hxx"
 
 // Initialise class static.
 const int PinguAction::pingu_height = 26;
@@ -186,11 +187,16 @@
              // If there is something below the Pingu
              if (rel_getpixel(0, -1) != Groundtype::GP_NOTHING)
                {
+                  // FIXME: this shouldn't be really here, but its a
+                  // FIXME: quick&dirty way to kill falling pingus
+                  if (resultant_force.y >= Actions::Faller::deadly_velocity)
+                    {
+                      pingu->set_action(Actions::Splashed);
+                      return;
+                    }
                  // Make it so that the Pingu won't go down any further.
-                 force_counter.y = 0;
-                 resultant_force.y = 0;
-
-                 pingu->set_velocity(resultant_force);
+                  pingu->set_velocity(Vector(0, 0));
+                  return;
                }
              else
                {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]