pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src/worldobjs smasher.cxx,1.7,1.8


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src/worldobjs smasher.cxx,1.7,1.8
Date: 18 Sep 2002 10:50:59 -0000

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

Modified Files:
        smasher.cxx 
Log Message:
placed some logic where it belongs, removed catch_pingu from PinguAction

Index: smasher.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/smasher.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- smasher.cxx 16 Sep 2002 22:51:33 -0000      1.7
+++ smasher.cxx 18 Sep 2002 10:50:57 -0000      1.8
@@ -28,6 +28,7 @@
 #include "../sound.hxx"
 #include "../world.hxx"
 #include "../worldobjsdata/smasher_data.hxx"
+#include "../pingu_action.hxx"
 #include "smasher.hxx"
 
 namespace WorldObjs {
@@ -86,7 +87,8 @@
                                          static_cast<int>(data->pos.x + 250),
                                          static_cast<int>(data->pos.y + 190)))
                    {
-                     (*pingu)->set_action(Actions::Splashed);
+                     if ((*pingu)->get_action()->get_type() != 
Actions::Splashed)
+                       (*pingu)->set_action(Actions::Splashed);
                    }
                }
            }
@@ -137,11 +139,14 @@
          && pingu->get_x() > data->pos.x + 190
          && pingu->get_x() < data->pos.x + 210))
     {
-      if (!smashing) 
+      if (pingu->get_action()->get_type() != Actions::Splashed)
        {
-         count = 0;
-         downwards = true;
-         smashing = true; 
+         if (!smashing) 
+           {
+             count = 0;
+             downwards = true;
+             smashing = true; 
+           }
        }
     }
 }





reply via email to

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