pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src/actions faller.cxx, 1.40, 1.40.2.1 sl


From: address@hidden
Subject: [Pingus-CVS] CVS: Games/Pingus/src/actions faller.cxx, 1.40, 1.40.2.1 slider.cxx, 1.18, 1.18.2.1
Date: Sat, 27 Mar 2004 15:18:43 +0100

Update of /var/lib/cvs/Games/Pingus/src/actions
In directory dark:/tmp/cvs-serv30312

Modified Files:
      Tag: pingus_0_6
        faller.cxx slider.cxx 
Log Message:
small beheviour improvement


Index: faller.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/actions/faller.cxx,v
retrieving revision 1.40
retrieving revision 1.40.2.1
diff -u -d -r1.40 -r1.40.2.1
--- faller.cxx  19 Apr 2003 10:23:18 -0000      1.40
+++ faller.cxx  27 Mar 2004 14:18:40 -0000      1.40.2.1
@@ -164,7 +164,7 @@
 bool
 Faller::change_allowed (ActionName new_action)
 {
-  return (new_action == Actions::Floater);
+  return new_action == Actions::Floater || new_action == Actions::Climber;
 }
 
 } // namespace Actions

Index: slider.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/actions/slider.cxx,v
retrieving revision 1.18
retrieving revision 1.18.2.1
diff -u -d -r1.18 -r1.18.2.1
--- slider.cxx  19 Apr 2003 10:23:18 -0000      1.18
+++ slider.cxx  27 Mar 2004 14:18:40 -0000      1.18.2.1
@@ -43,23 +43,26 @@
 
   sprite.update();
 
-  for (int i = 0; i < speed; ++i)
+  for (int i = 0; i < speed && rel_getpixel(1, 0) == Groundtype::GP_NOTHING; 
++i)
     {
       pingu->set_x(pingu->get_x() + pingu->direction);
 
       if (rel_getpixel(0, -1) ==  Groundtype::GP_NOTHING)
-       {
-         speed = (speed > 5) ? 5 : speed;
+        {
+          speed = (speed > 5) ? 5 : speed;
 
-         if (pingu->direction.is_right()) {
-           pingu->set_velocity(pingu->get_velocity() + Vector(speed, 0.0));
-         } else {
-           pingu->set_velocity(pingu->get_velocity() + Vector(-speed, 0.0));
-         }
+          if (pingu->direction.is_right())
+                                         {
+              pingu->set_velocity(pingu->get_velocity() + Vector(speed, 0.0));
+            } 
+          else
+                                         {
+              pingu->set_velocity(pingu->get_velocity() + Vector(-speed, 0.0));
+            }
 
-         pingu->set_action(Actions::Walker);
+          pingu->set_action(Actions::Walker);
           return;
-       }
+        }
     }
 
   speed -= 7 * 0.025f;





reply via email to

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