forked from mirror/openmw-tes3mp
Make the ParticleSystemController freeze the particle system instead of the emitter (Bug #3390)
This commit is contained in:
parent
e30bb31a79
commit
0c08f705c5
2 changed files with 3 additions and 3 deletions
|
@ -441,9 +441,9 @@ void ParticleSystemController::operator() (osg::Node* node, osg::NodeVisitor* nv
|
|||
{
|
||||
if (hasInput())
|
||||
{
|
||||
osgParticle::ParticleProcessor* emitter = static_cast<osgParticle::ParticleProcessor*>(node);
|
||||
osgParticle::ParticleSystem* partsys = static_cast<osgParticle::ParticleSystem*>(node);
|
||||
float time = getInputValue(nv);
|
||||
emitter->setEnabled(time >= mEmitStart && time < mEmitStop);
|
||||
partsys->setFrozen(!(time >= mEmitStart && time < mEmitStop));
|
||||
}
|
||||
traverse(node, nv);
|
||||
}
|
||||
|
|
|
@ -994,7 +994,7 @@ namespace NifOsg
|
|||
|
||||
osg::ref_ptr<ParticleSystemController> callback(new ParticleSystemController(partctrl));
|
||||
setupParticleController(partctrl, callback, particleflags);
|
||||
emitter->setUpdateCallback(callback);
|
||||
partsys->setUpdateCallback(callback);
|
||||
}
|
||||
|
||||
// affectors must be attached *after* the emitter in the scene graph for correct update order
|
||||
|
|
Loading…
Reference in a new issue