diff options
author | Chuck Miller <shadowmil@gmail.com> | 2009-05-03 17:11:25 -0400 |
---|---|---|
committer | Chuck Miller <shadowmil@gmail.com> | 2009-05-03 17:11:25 -0400 |
commit | a93a723db62ba2ad445b0fff26be5c51aefcda78 (patch) | |
tree | 1d39966d58f3d1c8c948f4719d22146d2373df10 /src/particle.cpp | |
parent | 19bf50bbff325024c2ed9ad724aeb6acb39bae39 (diff) | |
download | mana-a93a723db62ba2ad445b0fff26be5c51aefcda78.tar.gz mana-a93a723db62ba2ad445b0fff26be5c51aefcda78.tar.bz2 mana-a93a723db62ba2ad445b0fff26be5c51aefcda78.tar.xz mana-a93a723db62ba2ad445b0fff26be5c51aefcda78.zip |
Added rotational particles, and added code to show arrows when a player shoots them.
Diffstat (limited to 'src/particle.cpp')
-rw-r--r-- | src/particle.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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"))) { |