1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

Fix unnecessary copy of ParticleSystem in SceneUtil::CopyOp

This commit is contained in:
scrawl 2017-02-26 03:15:57 +01:00
parent 585524805f
commit a95773beef

View file

@ -38,7 +38,7 @@ namespace SceneUtil
return operator()(processor);
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);
return cloned;
}
@ -94,7 +94,7 @@ namespace SceneUtil
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();
return cloned;
}