From: Ingo Ruhnke Date: Sat, 24 May 2008 17:39:05 +0000 (+0000) Subject: Disabled bomb spraying particles all over the screen X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=d427db3e7c37d524e540511dd8cfce6e985bf32b;p=supertux.git Disabled bomb spraying particles all over the screen SVN-Revision: 5513 --- diff --git a/src/object/explosion.cpp b/src/object/explosion.cpp index c172e11ed..e840e9346 100644 --- a/src/object/explosion.cpp +++ b/src/object/explosion.cpp @@ -47,18 +47,21 @@ Explosion::explode() 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