mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-10 15:39:02 +00:00
Eliminate a dynamic_cast in ParticleSystemController
This commit is contained in:
parent
6cf2c35235
commit
a29aef14f1
@ -435,10 +435,9 @@ void ParticleSystemController::operator() (osg::Node* node, osg::NodeVisitor* nv
|
||||
{
|
||||
if (hasInput())
|
||||
{
|
||||
osgParticle::ParticleProcessor* emitter = dynamic_cast<osgParticle::ParticleProcessor*>(node);
|
||||
osgParticle::ParticleProcessor* emitter = static_cast<osgParticle::ParticleProcessor*>(node);
|
||||
float time = getInputValue(nv);
|
||||
if (emitter)
|
||||
emitter->setEnabled(time >= mEmitStart && time < mEmitStop);
|
||||
emitter->setEnabled(time >= mEmitStart && time < mEmitStop);
|
||||
}
|
||||
traverse(node, nv);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user