mirror of
https://github.com/glest/glest-source.git
synced 2025-08-30 03:09:49 +02:00
- attempt to improve unit particle performance by ONLY updating unit particles progress if the particle is busy
This commit is contained in:
@@ -926,10 +926,16 @@ void ParticleManager::update(int renderFps) {
|
|||||||
particleCount += (*it)->getAliveParticleCount();
|
particleCount += (*it)->getAliveParticleCount();
|
||||||
//if(renderFps < 0 || renderFps >= MIN_FPS_NORMAL_RENDERING ||
|
//if(renderFps < 0 || renderFps >= MIN_FPS_NORMAL_RENDERING ||
|
||||||
// dynamic_cast<UnitParticleSystem *>((*it)) == NULL) {
|
// dynamic_cast<UnitParticleSystem *>((*it)) == NULL) {
|
||||||
(*it)->update();
|
bool showParticle = true;
|
||||||
if((*it)->isEmpty()) {
|
if(dynamic_cast<UnitParticleSystem *>((*it)) != NULL) {
|
||||||
delete *it;
|
showParticle = (*it)->getVisible();
|
||||||
*it= NULL;
|
}
|
||||||
|
if(showParticle == true) {
|
||||||
|
(*it)->update();
|
||||||
|
if((*it)->isEmpty()) {
|
||||||
|
delete *it;
|
||||||
|
*it= NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user