From 9c5ae02755d01e002c1943de1d091e4b5d06a0b0 Mon Sep 17 00:00:00 2001 From: fickleheart Date: Tue, 19 Feb 2019 08:05:35 -0600 Subject: [PATCH] Fix cmd latency occasionally jumping to max --- src/g_game.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/g_game.c b/src/g_game.c index f0d221ff..3944c02a 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2162,7 +2162,7 @@ void G_Ticker(boolean run) G_CopyTiccmd(cmd, &netcmds[buf][i], 1); // Use the leveltime sent in the player's ticcmd to determine control lag - cmd->latency = modeattacking ? 0 : min((leveltime & 0xFF) - cmd->latency, MAXPREDICTTICS-1); //@TODO add a cvar to allow setting this max + cmd->latency = modeattacking ? 0 : min(((leveltime & 0xFF) - cmd->latency) & 0xFF, MAXPREDICTTICS-1); //@TODO add a cvar to allow setting this max } }