summaryrefslogtreecommitdiff
path: root/src/particle/particle.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-12 16:02:15 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-12 16:02:15 +0300
commit47cf0d69e8026927ca69547a17ac8e1d288538b7 (patch)
treeb8ec4ec0879b82a71994651f1454e039570f4fe5 /src/particle/particle.cpp
parent8f0610ac50a950f6c8b101191dd30956c851aaf7 (diff)
downloadplus-47cf0d69e8026927ca69547a17ac8e1d288538b7.tar.gz
plus-47cf0d69e8026927ca69547a17ac8e1d288538b7.tar.bz2
plus-47cf0d69e8026927ca69547a17ac8e1d288538b7.tar.xz
plus-47cf0d69e8026927ca69547a17ac8e1d288538b7.zip
Improve a bit particles creation.
Diffstat (limited to 'src/particle/particle.cpp')
-rw-r--r--src/particle/particle.cpp7
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);