- disabled staggered unit updates

This commit is contained in:
Mark Vejvoda
2010-08-24 02:49:55 +00:00
parent 65cf1bfdac
commit 0e3c0a8d0e
6 changed files with 36 additions and 22 deletions

View File

@@ -914,20 +914,24 @@ void ParticleManager::render(ParticleRenderer *pr, ModelRenderer *mr) const{
}
}
void ParticleManager::update() {
void ParticleManager::update(int renderFps) {
Chrono chrono;
chrono.start();
//const int MIN_FPS_NORMAL_RENDERING = 10;
int particleSystemCount = particleSystems.size();
int particleCount = 0;
list<ParticleSystem*>::iterator it;
for (it=particleSystems.begin(); it!=particleSystems.end(); it++) {
particleCount += (*it)->getAliveParticleCount();
(*it)->update();
if((*it)->isEmpty()) {
delete *it;
*it= NULL;
}
//if(renderFps < 0 || renderFps >= MIN_FPS_NORMAL_RENDERING ||
// dynamic_cast<UnitParticleSystem *>((*it)) == NULL) {
(*it)->update();
if((*it)->isEmpty()) {
delete *it;
*it= NULL;
}
//}
}
particleSystems.remove(NULL);