summaryrefslogtreecommitdiff
path: root/src/particleemitter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/particleemitter.cpp')
-rw-r--r--src/particleemitter.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/particleemitter.cpp b/src/particleemitter.cpp
index 6f66b632..8f46c32b 100644
--- a/src/particleemitter.cpp
+++ b/src/particleemitter.cpp
@@ -61,6 +61,7 @@ ParticleEmitter::ParticleEmitter(xmlNodePtr emitterNode, Particle *target, Map *
mParticleFadeOut.set(0);
mParticleFadeIn.set(0);
mOutput.set(1);
+ mParticleAlpha.set(1.0f);
for_each_xml_child_node(propertyNode, emitterNode)
{
@@ -153,6 +154,10 @@ ParticleEmitter::ParticleEmitter(xmlNodePtr emitterNode, Particle *target, Map *
{
mParticleFadeIn = readMinMax(propertyNode, 0);
}
+ else if (name == "alpha")
+ {
+ mParticleAlpha = readMinMax(propertyNode, 1.0f);
+ }
else
{
logger->log("Particle Engine: Warning, unknown emitter property \"%s\"",
@@ -260,6 +265,7 @@ ParticleEmitter & ParticleEmitter::operator=(const ParticleEmitter &o)
mParticleLifetime = o.mParticleLifetime;
mParticleFadeOut = o.mParticleFadeOut;
mParticleFadeIn = o.mParticleFadeIn;
+ mParticleAlpha = o.mParticleAlpha;
mMap = o.mMap;
mOutput = o.mOutput;
mParticleImage = o.mParticleImage;
@@ -343,6 +349,7 @@ ParticleEmitter::createParticles()
newParticle->setLifetime(mParticleLifetime.value());
newParticle->setFadeOut(mParticleFadeOut.value());
newParticle->setFadeIn(mParticleFadeIn.value());
+ newParticle->setAlpha(mParticleAlpha.value());
for (std::list<ParticleEmitter>::iterator i = mParticleChildEmitters.begin();
i != mParticleChildEmitters.end();