1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-21 11:53:51 +00:00

Eliminate a dynamic_cast in ParticleSystemController

This commit is contained in:
scrawl 2015-12-02 14:24:48 +01:00
parent 6cf2c35235
commit a29aef14f1

View file

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