Fixed quake falloff not working in floatcvt branch.

This commit is contained in:
MajorCooke 2016-03-24 12:21:03 -05:00 committed by Christoph Oelckers
parent 41387622f2
commit c8ba6f0611

View file

@ -238,9 +238,8 @@ double DEarthquake::GetFalloff(double dist) const
else if ((dist > m_Falloff) && (dist < m_TremorRadius))
{ //Player inside the radius, and outside the min distance for falloff.
double tremorsize = m_TremorRadius - m_Falloff;
double tremordist = dist - m_Falloff;
assert(tremorsize > 0);
return (1. - tremordist) / tremorsize;
return (1. - ((dist - m_Falloff) / tremorsize));
}
else
{ //Shouldn't happen.