- 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.
This commit is contained in:
Mitchell Richters 2023-03-18 19:20:53 +11:00
parent 4355a44721
commit 3442290fa2

View file

@ -136,7 +136,7 @@ void G_BuildTiccmd(ticcmd_t* cmd)
} }
cmd->ucmd = {}; cmd->ucmd = {};
I_GetEvent(); I_GetEvent();
gi->GetInput(inputScale, &cmd->ucmd); gi->GetInput(!SyncInput() ? inputScale : 1., &cmd->ucmd);
cmd->consistency = consistency[myconnectindex][(maketic / ticdup) % BACKUPTICS]; cmd->consistency = consistency[myconnectindex][(maketic / ticdup) % BACKUPTICS];
} }
@ -564,7 +564,7 @@ void TryRunTics (void)
oldentertics = entertic; oldentertics = entertic;
// update the scale factor for unsynchronised input here. // update the scale factor for unsynchronised input here.
inputScale = !SyncInput() ? I_GetInputFrac() : 1.; inputScale = I_GetInputFrac();
// get available tics // get available tics
NetUpdate (); NetUpdate ();
@ -614,7 +614,7 @@ void TryRunTics (void)
if (!SyncInput()) if (!SyncInput())
{ {
I_GetEvent(); I_GetEvent();
gi->GetInput(inputScale); gi->GetInput(!SyncInput() ? inputScale : 1.);
} }
return; return;
} }