mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 07:12:16 +00:00
Fixed quake falloff not working in floatcvt branch.
This commit is contained in:
parent
41387622f2
commit
c8ba6f0611
1 changed files with 1 additions and 2 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue