For non-active torches set the particle system speed factor to zero instead of destroying it (Fixes #1811)

deque
scrawl 11 years ago
parent 6c6b3bd890
commit 7432771ac7

@ -1430,9 +1430,12 @@ void ObjectAnimation::removeParticles()
{
for (unsigned int i=0; i<mObjectRoot->mParticles.size(); ++i)
{
mObjectRoot->mSceneMgr->destroyParticleSystem(mObjectRoot->mParticles[i]);
// Don't destroyParticleSystem, the ParticleSystemController is still holding a pointer to it.
// Don't setVisible, this could conflict with a VisController.
// The following will remove all spawned particles, then set the speed factor to zero so that no new ones will be spawned.
mObjectRoot->mParticles[i]->setSpeedFactor(0.f);
mObjectRoot->mParticles[i]->clear();
}
mObjectRoot->mParticles.clear();
}

Loading…
Cancel
Save