mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 06:55:54 -04:00
Freeze particle systems on construction if the AutoPlay flag is missing
This commit is contained in:
parent
0c08f705c5
commit
7202072196
@ -995,6 +995,14 @@ namespace NifOsg
|
|||||||
osg::ref_ptr<ParticleSystemController> callback(new ParticleSystemController(partctrl));
|
osg::ref_ptr<ParticleSystemController> callback(new ParticleSystemController(partctrl));
|
||||||
setupParticleController(partctrl, callback, particleflags);
|
setupParticleController(partctrl, callback, particleflags);
|
||||||
partsys->setUpdateCallback(callback);
|
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
|
// affectors must be attached *after* the emitter in the scene graph for correct update order
|
||||||
|
Loading…
x
Reference in New Issue
Block a user