mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-01 01:45:34 +00:00
For non-active torches set the particle system speed factor to zero instead of destroying it (Fixes #1811)
This commit is contained in:
parent
6c6b3bd890
commit
7432771ac7
1 changed files with 5 additions and 2 deletions
|
@ -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…
Reference in a new issue