diff --git a/components/nifosg/controller.cpp b/components/nifosg/controller.cpp index b8a38cf0f..28f61e4b6 100644 --- a/components/nifosg/controller.cpp +++ b/components/nifosg/controller.cpp @@ -435,10 +435,9 @@ void ParticleSystemController::operator() (osg::Node* node, osg::NodeVisitor* nv { if (hasInput()) { - osgParticle::ParticleProcessor* emitter = dynamic_cast(node); + osgParticle::ParticleProcessor* emitter = static_cast(node); float time = getInputValue(nv); - if (emitter) - emitter->setEnabled(time >= mEmitStart && time < mEmitStop); + emitter->setEnabled(time >= mEmitStart && time < mEmitStop); } traverse(node, nv); }