mirror of
https://github.com/glest/glest-source.git
synced 2025-08-22 16:02:50 +02:00
- added fire particles to the visible check to improve performance
This commit is contained in:
@@ -926,17 +926,18 @@ 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) {
|
||||||
bool showParticle = true;
|
bool showParticle = true;
|
||||||
if(dynamic_cast<UnitParticleSystem *>((*it)) != NULL) {
|
if( dynamic_cast<UnitParticleSystem *>((*it)) != NULL ||
|
||||||
showParticle = (*it)->getVisible();
|
dynamic_cast<FireParticleSystem *>((*it)) != NULL ) {
|
||||||
}
|
showParticle = (*it)->getVisible();
|
||||||
if(showParticle == true) {
|
}
|
||||||
(*it)->update();
|
if(showParticle == true) {
|
||||||
if((*it)->isEmpty()) {
|
(*it)->update();
|
||||||
delete *it;
|
if((*it)->isEmpty()) {
|
||||||
*it= NULL;
|
delete *it;
|
||||||
}
|
*it= NULL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
particleSystems.remove(NULL);
|
particleSystems.remove(NULL);
|
||||||
|
Reference in New Issue
Block a user