From 3442290fa2b84415f24427f4734019a8c1e4c7e9 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sat, 18 Mar 2023 19:20:53 +1100 Subject: [PATCH] - Repair bad setup for global input scale uncovered after making Duke better. * `I_GetInputFrac()` must always be called, even if we don't use it otherwise the value grows too large. --- source/core/mainloop.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/core/mainloop.cpp b/source/core/mainloop.cpp index 196ea891e..7267adae5 100644 --- a/source/core/mainloop.cpp +++ b/source/core/mainloop.cpp @@ -136,7 +136,7 @@ void G_BuildTiccmd(ticcmd_t* cmd) } cmd->ucmd = {}; I_GetEvent(); - gi->GetInput(inputScale, &cmd->ucmd); + gi->GetInput(!SyncInput() ? inputScale : 1., &cmd->ucmd); cmd->consistency = consistency[myconnectindex][(maketic / ticdup) % BACKUPTICS]; } @@ -564,7 +564,7 @@ void TryRunTics (void) oldentertics = entertic; // update the scale factor for unsynchronised input here. - inputScale = !SyncInput() ? I_GetInputFrac() : 1.; + inputScale = I_GetInputFrac(); // get available tics NetUpdate (); @@ -614,7 +614,7 @@ void TryRunTics (void) if (!SyncInput()) { I_GetEvent(); - gi->GetInput(inputScale); + gi->GetInput(!SyncInput() ? inputScale : 1.); } return; }