mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-08 19:23:28 +02:00
Prefer erase over repeated pop_front calls
This commit is contained in:
parent
1b08563079
commit
2eecb61da5
1 changed files with 1 additions and 4 deletions
|
@ -608,10 +608,7 @@ void ParticleEffectEntityItem::stepSimulation(float deltaTime) {
|
|||
integrateParticle(particle, deltaTime);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < popCount; i++) {
|
||||
_particles.pop_front();
|
||||
}
|
||||
_particles.erase(_particles.begin(), _particles.begin() + popCount);
|
||||
|
||||
// emit new particles, but only if we are emmitting
|
||||
if (getIsEmitting() && _emitRate > 0.0f && _lifespan > 0.0f && _polarStart <= _polarFinish) {
|
||||
|
|
Loading…
Reference in a new issue