diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-11-12 16:02:15 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-11-12 16:02:15 +0300 |
commit | 47cf0d69e8026927ca69547a17ac8e1d288538b7 (patch) | |
tree | b8ec4ec0879b82a71994651f1454e039570f4fe5 /src/particle/particle.cpp | |
parent | 8f0610ac50a950f6c8b101191dd30956c851aaf7 (diff) | |
download | manaplus-47cf0d69e8026927ca69547a17ac8e1d288538b7.tar.gz manaplus-47cf0d69e8026927ca69547a17ac8e1d288538b7.tar.bz2 manaplus-47cf0d69e8026927ca69547a17ac8e1d288538b7.tar.xz manaplus-47cf0d69e8026927ca69547a17ac8e1d288538b7.zip |
Improve a bit particles creation.
Diffstat (limited to 'src/particle/particle.cpp')
-rw-r--r-- | src/particle/particle.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/particle/particle.cpp b/src/particle/particle.cpp index 9dee09754..b487e5ffb 100644 --- a/src/particle/particle.cpp +++ b/src/particle/particle.cpp @@ -203,8 +203,11 @@ bool Particle::update() { FOR_EACH (EmitterConstIterator, e, mChildEmitters) { - Particles newParticles = (*e)->createParticles(mLifetimePast); - FOR_EACH (ParticleConstIterator, it, newParticles) + std::vector<Particle*> newParticles; + (*e)->createParticles(mLifetimePast, newParticles); + FOR_EACH (std::vector<Particle*>::const_iterator, + it, + newParticles) { Particle *const p = *it; p->moveBy(mPos); |