Added the ability for osgParticle::ParticleEffect to switch off the automatic setup.
Normally the automatic setup is useful, but in the case of the .osg support this automatic update was forcing premature loading of imagery that wasn't necessarily, and can lead to reports of looking for files that arn't present.
This commit is contained in:
@@ -27,6 +27,20 @@
|
||||
|
||||
using namespace osgParticle;
|
||||
|
||||
ExplosionEffect::ExplosionEffect(bool automaticSetup):
|
||||
ParticleEffect(automaticSetup)
|
||||
{
|
||||
setDefaults();
|
||||
|
||||
_position.set(0.0f,0.0f,0.0f);
|
||||
_scale = 1.0f;
|
||||
_intensity = 1.0f;
|
||||
|
||||
_emitterDuration = 1.0;
|
||||
|
||||
if (_automaticSetup) buildEffect();
|
||||
}
|
||||
|
||||
ExplosionEffect::ExplosionEffect(const osg::Vec3& position, float scale, float intensity)
|
||||
{
|
||||
setDefaults();
|
||||
@@ -37,7 +51,7 @@ ExplosionEffect::ExplosionEffect(const osg::Vec3& position, float scale, float i
|
||||
|
||||
_emitterDuration = 1.0;
|
||||
|
||||
buildEffect();
|
||||
if (_automaticSetup) buildEffect();
|
||||
}
|
||||
|
||||
ExplosionEffect::ExplosionEffect(const ExplosionEffect& copy, const osg::CopyOp& copyop):
|
||||
|
||||
Reference in New Issue
Block a user