From c8ba6f0611e710a4988f7fb9f0290a4aea5dfe88 Mon Sep 17 00:00:00 2001 From: MajorCooke Date: Thu, 24 Mar 2016 12:21:03 -0500 Subject: [PATCH] Fixed quake falloff not working in floatcvt branch. --- src/g_shared/a_quake.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/g_shared/a_quake.cpp b/src/g_shared/a_quake.cpp index e16b7e480..a970f8969 100644 --- a/src/g_shared/a_quake.cpp +++ b/src/g_shared/a_quake.cpp @@ -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.