diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-16 23:39:55 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-16 23:39:55 +0300 |
commit | 68151e88af407f5c45cd4fbf671c59645d8b4557 (patch) | |
tree | 5bb23c212922a53ad8d240b7e373b65a671ef629 /src/particle/particleengine.cpp | |
parent | 9a8e4dd9e99abff3b6e9b8351edd6bd1c009ed0e (diff) | |
download | plus-68151e88af407f5c45cd4fbf671c59645d8b4557.tar.gz plus-68151e88af407f5c45cd4fbf671c59645d8b4557.tar.bz2 plus-68151e88af407f5c45cd4fbf671c59645d8b4557.tar.xz plus-68151e88af407f5c45cd4fbf671c59645d8b4557.zip |
Improve performance in moving child particles.
Diffstat (limited to 'src/particle/particleengine.cpp')
-rw-r--r-- | src/particle/particleengine.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/particle/particleengine.cpp b/src/particle/particleengine.cpp index cb43f5059..648d3b62d 100644 --- a/src/particle/particleengine.cpp +++ b/src/particle/particleengine.cpp @@ -57,6 +57,7 @@ const float ParticleEngine::PARTICLE_SKY = 800.0F; ParticleEngine::ParticleEngine() : mChildParticles(), + mChildMoveParticles(), mMap(nullptr) { ParticleEngine::particleCount++; @@ -112,6 +113,7 @@ bool ParticleEngine::update() restrict2 } else { + mChildMoveParticles.remove(*p); delete particle; p = mChildParticles.erase(p); } @@ -331,4 +333,5 @@ void ParticleEngine::clear() restrict2 { delete_all(mChildParticles); mChildParticles.clear(); + mChildMoveParticles.clear(); } |