mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +00:00
Fixed A_QuakeEx falloff not working properly.
This commit is contained in:
parent
75bcec411e
commit
a9ef8cc637
1 changed files with 1 additions and 2 deletions
|
@ -289,9 +289,8 @@ fixed_t DEarthquake::GetFalloff(fixed_t dist) const
|
||||||
else if ((dist > m_Falloff) && (dist < m_TremorRadius))
|
else if ((dist > m_Falloff) && (dist < m_TremorRadius))
|
||||||
{ //Player inside the radius, and outside the min distance for falloff.
|
{ //Player inside the radius, and outside the min distance for falloff.
|
||||||
fixed_t tremorsize = m_TremorRadius - m_Falloff;
|
fixed_t tremorsize = m_TremorRadius - m_Falloff;
|
||||||
fixed_t tremordist = dist - m_Falloff;
|
|
||||||
assert(tremorsize > 0);
|
assert(tremorsize > 0);
|
||||||
return (FRACUNIT - FixedMul(FRACUNIT,tremordist) / tremorsize);
|
return (FRACUNIT - FixedDiv((dist - m_Falloff), tremorsize));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ //Shouldn't happen.
|
{ //Shouldn't happen.
|
||||||
|
|
Loading…
Reference in a new issue