1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00

Freeze particle systems on construction if the AutoPlay flag is missing

This commit is contained in:
scrawl 2016-05-14 22:38:49 +02:00
parent 0c08f705c5
commit 7202072196

View File

@ -995,6 +995,14 @@ namespace NifOsg
osg::ref_ptr<ParticleSystemController> callback(new ParticleSystemController(partctrl));
setupParticleController(partctrl, callback, particleflags);
partsys->setUpdateCallback(callback);
if (!(particleflags & Nif::NiNode::ParticleFlag_AutoPlay))
{
partsys->setFrozen(true);
// HACK: particle system will not render in Frozen state if there was no update
osg::NodeVisitor nv;
partsys->update(0.0, nv);
}
}
// affectors must be attached *after* the emitter in the scene graph for correct update order