diff --git a/components/nifosg/controller.cpp b/components/nifosg/controller.cpp index aabe07c86..ce6ab2c48 100644 --- a/components/nifosg/controller.cpp +++ b/components/nifosg/controller.cpp @@ -441,9 +441,9 @@ void ParticleSystemController::operator() (osg::Node* node, osg::NodeVisitor* nv { if (hasInput()) { - osgParticle::ParticleProcessor* emitter = static_cast(node); + osgParticle::ParticleSystem* partsys = static_cast(node); float time = getInputValue(nv); - emitter->setEnabled(time >= mEmitStart && time < mEmitStop); + partsys->setFrozen(!(time >= mEmitStart && time < mEmitStop)); } traverse(node, nv); } diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index 874ca9eaa..b5311953e 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -994,7 +994,7 @@ namespace NifOsg osg::ref_ptr 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