mirror of
https://github.com/glest/glest-source.git
synced 2025-08-18 06:01:17 +02:00
Bugfix: particles are also colored with daylight effect if they are created. ( if isDaylightAffected is set )
This commit is contained in:
@@ -997,6 +997,12 @@ void UnitParticleSystem::initParticle(Particle *p, int particleIndex){
|
|||||||
const float radRatio= sqrtf(mod / radius);
|
const float radRatio= sqrtf(mod / radius);
|
||||||
#endif
|
#endif
|
||||||
p->color= color;
|
p->color= color;
|
||||||
|
if(isDaylightAffected==true)
|
||||||
|
{
|
||||||
|
p->color.x=p->color.x*lightColor.x;
|
||||||
|
p->color.y=p->color.y*lightColor.y;
|
||||||
|
p->color.z=p->color.z*lightColor.z;
|
||||||
|
}
|
||||||
if(radiusBasedStartenergy == true){
|
if(radiusBasedStartenergy == true){
|
||||||
p->energy= static_cast<int> (maxParticleEnergy * radRatio) + random.randRange(-varParticleEnergy,
|
p->energy= static_cast<int> (maxParticleEnergy * radRatio) + random.randRange(-varParticleEnergy,
|
||||||
varParticleEnergy);
|
varParticleEnergy);
|
||||||
|
Reference in New Issue
Block a user