mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-01 07:36:41 +00:00
Fix unnecessary copy of ParticleSystem in SceneUtil::CopyOp
This commit is contained in:
parent
585524805f
commit
a95773beef
1 changed files with 2 additions and 2 deletions
|
@ -38,7 +38,7 @@ namespace SceneUtil
|
||||||
return operator()(processor);
|
return operator()(processor);
|
||||||
if (const osgParticle::ParticleSystemUpdater* updater = dynamic_cast<const osgParticle::ParticleSystemUpdater*>(node))
|
if (const osgParticle::ParticleSystemUpdater* updater = dynamic_cast<const osgParticle::ParticleSystemUpdater*>(node))
|
||||||
{
|
{
|
||||||
osgParticle::ParticleSystemUpdater* cloned = osg::clone(updater, *this);
|
osgParticle::ParticleSystemUpdater* cloned = new osgParticle::ParticleSystemUpdater(*updater, osg::CopyOp::SHALLOW_COPY);
|
||||||
mMap2[cloned] = updater->getParticleSystem(0);
|
mMap2[cloned] = updater->getParticleSystem(0);
|
||||||
return cloned;
|
return cloned;
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ namespace SceneUtil
|
||||||
|
|
||||||
osgParticle::ParticleProcessor* CopyOp::operator() (const osgParticle::ParticleProcessor* processor) const
|
osgParticle::ParticleProcessor* CopyOp::operator() (const osgParticle::ParticleProcessor* processor) const
|
||||||
{
|
{
|
||||||
osgParticle::ParticleProcessor* cloned = osg::clone(processor, *this);
|
osgParticle::ParticleProcessor* cloned = osg::clone(processor, osg::CopyOp::SHALLOW_COPY);
|
||||||
mMap[cloned] = processor->getParticleSystem();
|
mMap[cloned] = processor->getParticleSystem();
|
||||||
return cloned;
|
return cloned;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue