diff --git a/source/common/utility/i_time.cpp b/source/common/utility/i_time.cpp index d0cbaf8f1..4f2ac96cb 100644 --- a/source/common/utility/i_time.cpp +++ b/source/common/utility/i_time.cpp @@ -198,12 +198,12 @@ void I_ResetFrameTime() FirstFrameStartTime += (CurrentFrameStartTime - ft); } -double I_GetInputFrac(bool const synchronised, double const ticrate) +double I_GetInputFrac(bool const synchronised) { if (!synchronised) { const double now = I_msTimeF(); - const double result = (now - lastinputtime) * ticrate * (1. / 1000.); + const double result = (now - lastinputtime) * GameTicRate * (1. / 1000.); lastinputtime = now; if (result < 1) @@ -213,7 +213,7 @@ double I_GetInputFrac(bool const synchronised, double const ticrate) // This rectifies a deviation of 100+ ms or more depending on the length // of the operation to be within 1-2 ms of synchronised input // from 60 fps to at least 1000 fps at ticrates of 30 and 40 Hz. - return result * (1. + 0.35 * (1. - ticrate * (1. / 50.)) * (1. - result)); + return result * (1. + 0.35 * (1. - GameTicRate * (1. / 50.)) * (1. - result)); } } diff --git a/source/common/utility/i_time.h b/source/common/utility/i_time.h index 4e7874bb8..d9501ea96 100644 --- a/source/common/utility/i_time.h +++ b/source/common/utility/i_time.h @@ -40,7 +40,7 @@ uint64_t I_nsTime(); void I_ResetFrameTime(); // Return a decimal fraction to scale input operations at framerate -double I_GetInputFrac(bool const synchronised, double const ticrate = GameTicRate); +double I_GetInputFrac(bool const synchronised); // Reset the last input check to after a lengthy operation void I_ResetInputTime();