1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 21:35:24 +00:00

Make the ParticleSystemController freeze the particle system instead of the emitter (Bug #3390)

This commit is contained in:
scrawl 2016-05-14 22:36:53 +02:00
parent e30bb31a79
commit 0c08f705c5
2 changed files with 3 additions and 3 deletions

View File

@ -441,9 +441,9 @@ void ParticleSystemController::operator() (osg::Node* node, osg::NodeVisitor* nv
{ {
if (hasInput()) if (hasInput())
{ {
osgParticle::ParticleProcessor* emitter = static_cast<osgParticle::ParticleProcessor*>(node); osgParticle::ParticleSystem* partsys = static_cast<osgParticle::ParticleSystem*>(node);
float time = getInputValue(nv); float time = getInputValue(nv);
emitter->setEnabled(time >= mEmitStart && time < mEmitStop); partsys->setFrozen(!(time >= mEmitStart && time < mEmitStop));
} }
traverse(node, nv); traverse(node, nv);
} }

View File

@ -994,7 +994,7 @@ 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);
emitter->setUpdateCallback(callback); partsys->setUpdateCallback(callback);
} }
// 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