From a93a723db62ba2ad445b0fff26be5c51aefcda78 Mon Sep 17 00:00:00 2001 From: Chuck Miller Date: Sun, 3 May 2009 17:11:25 -0400 Subject: Added rotational particles, and added code to show arrows when a player shoots them. --- src/particle.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/particle.cpp') diff --git a/src/particle.cpp b/src/particle.cpp index 78db2a58..42ec84d7 100644 --- a/src/particle.cpp +++ b/src/particle.cpp @@ -31,6 +31,7 @@ #include "map.h" #include "particle.h" #include "particleemitter.h" +#include "rotationalparticle.h" #include "textparticle.h" #include "resources/resourcemanager.h" @@ -222,7 +223,6 @@ bool Particle::update() p = mChildParticles.erase(p); } } - if (!mAlive && mChildParticles.empty() && mAutoDelete) { return false; @@ -280,6 +280,11 @@ Particle *Particle::addEffect(const std::string &particleEffectFile, { newParticle = new AnimationParticle(mMap, node); } + // Rotational + else if ((node = XML::findFirstChildByName(effectChildNode, "rotation"))) + { + newParticle = new RotationalParticle(mMap, node); + } // Image else if ((node = XML::findFirstChildByName(effectChildNode, "image"))) { -- cgit v1.2.3-60-g2f50