Don't submit future ticcmds if they could overwrite a needed ticcmd

This commit is contained in:
AJ Martinez 2023-07-14 02:33:33 -07:00
parent 2ebd3fcca4
commit 8755582901

View file

@ -4567,7 +4567,8 @@ static void HandlePacketFromPlayer(SINT8 node)
// If we've alredy received a ticcmd for this tic, just submit it for the next one.
tic_t faketic = maketic;
if (!!(netcmds[maketic % BACKUPTICS][netconsole].angleturn & TICCMD_RECEIVED))
if ((!!(netcmds[maketic % BACKUPTICS][netconsole].angleturn & TICCMD_RECEIVED))
&& (maketic - firstticstosend < BACKUPTICS))
faketic++;
// Copy ticcmd