forked from teamnwah/openmw-tes3coop
Fix for copy construction of particle system templates
This commit is contained in:
parent
99c9907ff3
commit
60f288195f
1 changed files with 7 additions and 0 deletions
|
@ -23,6 +23,9 @@ ParticleSystem::ParticleSystem(const ParticleSystem ©, const osg::CopyOp &co
|
|||
: osgParticle::ParticleSystem(copy, copyop)
|
||||
, mQuota(copy.mQuota)
|
||||
{
|
||||
// For some reason the osgParticle constructor doesn't copy the particles
|
||||
for (int i=0;i<copy.numParticles()-copy.numDeadParticles();++i)
|
||||
_particles.push_back(*copy.getParticle(i));
|
||||
}
|
||||
|
||||
void ParticleSystem::setQuota(int quota)
|
||||
|
@ -201,6 +204,10 @@ Emitter::Emitter()
|
|||
Emitter::Emitter(const Emitter ©, const osg::CopyOp ©op)
|
||||
: osgParticle::Emitter(copy, copyop)
|
||||
, mTargets(copy.mTargets)
|
||||
, mPlacer(copy.mPlacer)
|
||||
, mShooter(copy.mShooter)
|
||||
// need a deep copy because the remainder is stored in the object
|
||||
, mCounter(osg::clone(copy.mCounter.get(), osg::CopyOp::DEEP_COPY_ALL))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue