Getting paranoid with mixed integer / float operations

This commit is contained in:
ptitSeb 2016-04-06 22:43:51 +02:00
parent ead5da376d
commit efde059273

2
Sources/EntitiesMP/Common/Particles.cpp Normal file → Executable file
View File

@ -1731,7 +1731,7 @@ void Particles_FlameThrowerStart(const CPlacement3D &plPipe, FLOAT fStartTime, F
FLOAT3D vCenter = plPipe.pl_PositionVector;
FLOAT fPowerFactor = Clamp((fNow - fStartTime)/2.0f,0.0f,1.0f);
fPowerFactor *= Clamp(1+(fStopTime-fNow)/2.0f,0.0f,1.0f);
fPowerFactor *= Clamp(1.0f+(fStopTime-fNow)/2.0f,0.0f,1.0f);
INDEX ctParticles = (INDEX) (FLOAT(CT_FTSPARKS) * fPowerFactor);
ASSERT( ctParticles<=CT_MAX_PARTICLES_TABLE);
FLOAT fHeight = 1.0f*fPowerFactor;