diff options
author | Philipp Sehmisch <tmw@crushnet.org> | 2007-06-11 14:27:48 +0000 |
---|---|---|
committer | Philipp Sehmisch <tmw@crushnet.org> | 2007-06-11 14:27:48 +0000 |
commit | 65539d91787bf2b122f833781fed8b6aa9bc13cd (patch) | |
tree | 5be373399b9168d1898a887166cccaa32743af53 /src/being.cpp | |
parent | 93a3d067c7f9ffaed785baaa021c572eed0ef57c (diff) | |
download | mana-65539d91787bf2b122f833781fed8b6aa9bc13cd.tar.gz mana-65539d91787bf2b122f833781fed8b6aa9bc13cd.tar.bz2 mana-65539d91787bf2b122f833781fed8b6aa9bc13cd.tar.xz mana-65539d91787bf2b122f833781fed8b6aa9bc13cd.zip |
Fixed a bug that prevented being-controlled particles from being deleted (thanks to tuchs for reporting).
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/being.cpp b/src/being.cpp index 45032f6f..0ddceb0f 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -391,10 +391,19 @@ Being::logic() //Update particle effects for ( std::list<Particle *>::iterator i = mChildParticleEffects.begin(); - i != mChildParticleEffects.end(); - i++) + i != mChildParticleEffects.end(); + + ) { (*i)->setPosition((float)mPx + 16.0f, (float)mPy + 32.0f); + if (!(*i)->isAlive()) + { + (*i)->kill(); + i = mChildParticleEffects.erase(i); + } + else { + i++; + } } } |