Skip to content

Commit 13cce53

Browse files
committed
unify(particlesys): Merge fix for erroneous particle visibility thresholds in Particle::isInvisible from Generals (TheSuperHackers#2153)
This merge fixes 13 broken particle effects in Zero Hour: airCarrierExplosion2 airCarrierHotPillarArms airCarrierJet01Explosion airCarrierJetExplosion1 airCarrierJetExplosion2 airCarrierJetExplosion3 ArmExplosionSmall01 BarrelExplosion BuggyNewExplosionArms FireBaseHowitzerPillarArms HotPillarArms MammothTankExplosionArms SpectreHotPillarArms
1 parent e0befc8 commit 13cce53

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

GeneralsMD/Code/GameEngine/Source/GameClient/System/ParticleSys.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -609,14 +609,14 @@ Bool Particle::isInvisible( void )
609609
// check that we're not in the process of going to another color
610610
if (m_colorKey[ m_colorTargetKey ].frame == 0)
611611
{
612-
if ((m_color.red + m_color.green + m_color.blue) <= 0.06f)
612+
if (m_color.red < 0.01f && m_color.green < 0.01f && m_color.blue < 0.01f)
613613
return true;
614614
}
615615
return false;
616616

617617
case ParticleSystemInfo::ALPHA:
618618
// if alpha is zero, this particle is invisible
619-
if (m_alpha < 0.02f)
619+
if (m_alpha < 0.01f)
620620
return true;
621621
return false;
622622

@@ -630,7 +630,7 @@ Bool Particle::isInvisible( void )
630630
// check that we're not in the process of going to another color
631631
if (m_colorKey[ m_colorTargetKey ].frame == 0)
632632
{
633-
if ((m_color.red * m_color.green * m_color.blue) > 0.95f)
633+
if (m_color.red > 0.99f && m_color.green > 0.99f && m_color.blue > 0.99f)
634634
return true;
635635
}
636636
return false;

0 commit comments

Comments
 (0)