[Supertux-Commit] r5513 - trunk/supertux/src/object

grumbel at millhouse.dreamhost.com grumbel at millhouse.dreamhost.com
Sat May 24 10:39:06 PDT 2008


Author: grumbel
Date: 2008-05-24 10:39:05 -0700 (Sat, 24 May 2008)
New Revision: 5513

Modified:
   trunk/supertux/src/object/explosion.cpp
Log:
Disabled bomb spraying particles all over the screen

Modified: trunk/supertux/src/object/explosion.cpp
===================================================================
--- trunk/supertux/src/object/explosion.cpp	2008-05-23 12:52:01 UTC (rev 5512)
+++ trunk/supertux/src/object/explosion.cpp	2008-05-24 17:39:05 UTC (rev 5513)
@@ -47,18 +47,21 @@
   sprite->set_animation_loops(1); //TODO: this is necessary because set_action will not set "loops" when "action" is the default action
   sound_manager->play("sounds/explosion.wav", get_pos());
 
-  // spawn some particles
-  // TODO: provide convenience function in MovingSprite or MovingObject?
-  for (int i = 0; i < 100; i++) {
-    Vector ppos = bbox.get_middle();
-    float angle = systemRandom.randf(-M_PI_2, M_PI_2);
-    float velocity = systemRandom.randf(450, 900);
-    float vx = sin(angle)*velocity;
-    float vy = -cos(angle)*velocity;
-    Vector pspeed = Vector(vx, vy);
-    Vector paccel = Vector(0, 1000);
-    Sector::current()->add_object(new SpriteParticle("images/objects/particles/explosion.sprite", "default", ppos, ANCHOR_MIDDLE, pspeed, paccel, LAYER_OBJECTS-1));
-  }
+  if (0)
+    {
+      // spawn some particles
+      // TODO: provide convenience function in MovingSprite or MovingObject?
+      for (int i = 0; i < 100; i++) {
+        Vector ppos = bbox.get_middle();
+        float angle = systemRandom.randf(-M_PI_2, M_PI_2);
+        float velocity = systemRandom.randf(450, 900);
+        float vx = sin(angle)*velocity;
+        float vy = -cos(angle)*velocity;
+        Vector pspeed = Vector(vx, vy);
+        Vector paccel = Vector(0, 1000);
+        Sector::current()->add_object(new SpriteParticle("images/objects/particles/explosion.sprite", "default", ppos, ANCHOR_MIDDLE, pspeed, paccel, LAYER_OBJECTS-1));
+      }
+    }
 }
 
 void 




More information about the Supertux-Commit mailing list