mirror of
https://github.com/glest/glest-source.git
synced 2025-08-26 01:23:35 +02:00
missing initialisation of "emissionRateFade" made damage smoke particles from objects disappear or much too strong
This commit is contained in:
@@ -541,11 +541,14 @@ UnitParticleSystem::UnitParticleSystem(int particleCount):
|
|||||||
|
|
||||||
setParticleSize(0.6f);
|
setParticleSize(0.6f);
|
||||||
setColorNoEnergy(Vec4f(1.0f, 0.5f, 0.0f, 1.0f));
|
setColorNoEnergy(Vec4f(1.0f, 0.5f, 0.0f, 1.0f));
|
||||||
|
sizeNoEnergy=1.0f;
|
||||||
|
|
||||||
primitive= pQuad;
|
primitive= pQuad;
|
||||||
gravity= 0.0f;
|
gravity= 0.0f;
|
||||||
|
|
||||||
fixed= false;
|
fixed= false;
|
||||||
|
shape = UnitParticleSystem::sLinear;
|
||||||
|
angle= 0.0f;
|
||||||
rotation= 0.0f;
|
rotation= 0.0f;
|
||||||
relativeDirection= true;
|
relativeDirection= true;
|
||||||
relative= false;
|
relative= false;
|
||||||
@@ -565,6 +568,7 @@ UnitParticleSystem::UnitParticleSystem(int particleCount):
|
|||||||
|
|
||||||
delay = 0; // none
|
delay = 0; // none
|
||||||
lifetime = -1; // forever
|
lifetime = -1; // forever
|
||||||
|
emissionRateFade=0.0f;
|
||||||
|
|
||||||
startTime = 0;
|
startTime = 0;
|
||||||
endTime = 1;
|
endTime = 1;
|
||||||
@@ -741,7 +745,7 @@ void UnitParticleSystem::updateParticle(Particle *p){
|
|||||||
}
|
}
|
||||||
p->speed+= p->accel;
|
p->speed+= p->accel;
|
||||||
p->color= color * energyRatio + colorNoEnergy * (1.0f - energyRatio);
|
p->color= color * energyRatio + colorNoEnergy * (1.0f - energyRatio);
|
||||||
if(isDaylightAffected)
|
if(isDaylightAffected==true)
|
||||||
{
|
{
|
||||||
p->color.x=p->color.x*lightColor.x;
|
p->color.x=p->color.x*lightColor.x;
|
||||||
p->color.y=p->color.y*lightColor.y;
|
p->color.y=p->color.y*lightColor.y;
|
||||||
|
Reference in New Issue
Block a user