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/particleemitter.cpp | |
parent | 8f0610ac50a950f6c8b101191dd30956c851aaf7 (diff) | |
download | plus-47cf0d69e8026927ca69547a17ac8e1d288538b7.tar.gz plus-47cf0d69e8026927ca69547a17ac8e1d288538b7.tar.bz2 plus-47cf0d69e8026927ca69547a17ac8e1d288538b7.tar.xz plus-47cf0d69e8026927ca69547a17ac8e1d288538b7.zip |
Improve a bit particles creation.
Diffstat (limited to 'src/particle/particleemitter.cpp')
-rw-r--r-- | src/particle/particleemitter.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/particle/particleemitter.cpp b/src/particle/particleemitter.cpp index af9b32fe4..5cba3ba54 100644 --- a/src/particle/particleemitter.cpp +++ b/src/particle/particleemitter.cpp @@ -483,14 +483,13 @@ ParticleEmitter::readParticleEmitterProp(XmlNodePtrConst propertyNode, T def) return retval; } -std::list<Particle *> ParticleEmitter::createParticles(const int tick) +void ParticleEmitter::createParticles(const int tick, + std::vector<Particle*> &newParticles) { - std::list<Particle *> newParticles; - if (mOutputPauseLeft > 0) { mOutputPauseLeft --; - return newParticles; + return; } mOutputPauseLeft = mOutputPause.value(tick); @@ -574,8 +573,6 @@ std::list<Particle *> ParticleEmitter::createParticles(const int tick) newParticles.push_back(newParticle); } - - return newParticles; } void ParticleEmitter::adjustSize(const int w, const int h) |