- attempt to improve unit particle performance by ONLY updating unit particles progress if the particle is busy
This commit is contained in:
parent
0e3c0a8d0e
commit
3828d23670
|
@ -926,10 +926,16 @@ void ParticleManager::update(int renderFps) {
|
|||
particleCount += (*it)->getAliveParticleCount();
|
||||
//if(renderFps < 0 || renderFps >= MIN_FPS_NORMAL_RENDERING ||
|
||||
// dynamic_cast<UnitParticleSystem *>((*it)) == NULL) {
|
||||
(*it)->update();
|
||||
if((*it)->isEmpty()) {
|
||||
delete *it;
|
||||
*it= NULL;
|
||||
bool showParticle = true;
|
||||
if(dynamic_cast<UnitParticleSystem *>((*it)) != NULL) {
|
||||
showParticle = (*it)->getVisible();
|
||||
}
|
||||
if(showParticle == true) {
|
||||
(*it)->update();
|
||||
if((*it)->isEmpty()) {
|
||||
delete *it;
|
||||
*it= NULL;
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue