mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 08:49:40 +00:00
Freeze particle systems on construction if the AutoPlay flag is missing
This commit is contained in:
parent
0c08f705c5
commit
7202072196
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue