diff --git a/source/common/utility/i_time.cpp b/source/common/utility/i_time.cpp index d9117d8ea..b3312b89f 100644 --- a/source/common/utility/i_time.cpp +++ b/source/common/utility/i_time.cpp @@ -210,17 +210,12 @@ void I_ResetFrameTime() FirstFrameStartTime += (CurrentFrameStartTime - ft); } -double I_GetInputFrac(bool const synchronised) +double I_GetInputFrac() { - if (!synchronised) - { - const double now = I_msTimeF(); - const double result = (now - lastinputtime) * GameTicRate * (1. / 1000.); - lastinputtime = now; - return result; - } - - return 1; + const double now = I_msTimeF(); + const double result = (now - lastinputtime) * GameTicRate * (1. / 1000.); + lastinputtime = now; + return result; } void I_ResetInputTime() diff --git a/source/common/utility/i_time.h b/source/common/utility/i_time.h index e5d3d5c8d..a77640fb5 100644 --- a/source/common/utility/i_time.h +++ b/source/common/utility/i_time.h @@ -42,7 +42,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 I_GetInputFrac(); // Reset the last input check to after a lengthy operation void I_ResetInputTime(); diff --git a/source/core/mainloop.cpp b/source/core/mainloop.cpp index 24f1e707c..75d96fbce 100644 --- a/source/core/mainloop.cpp +++ b/source/core/mainloop.cpp @@ -565,7 +565,7 @@ void TryRunTics (void) oldentertics = entertic; // update the scale factor for unsynchronised input here. - inputScale = I_GetInputFrac(SyncInput()); + inputScale = !SyncInput() ? I_GetInputFrac() : 1.; // get available tics NetUpdate ();