mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-12-24 08:52:33 +00:00
Buffer double-submitted ticcmds
This commit is contained in:
parent
edfd43ce81
commit
fe122291bc
1 changed files with 10 additions and 4 deletions
|
|
@ -5170,8 +5170,14 @@ static void HandlePacketFromPlayer(SINT8 node)
|
|||
|| netbuffer->packettype == PT_NODEKEEPALIVEMIS)
|
||||
break;
|
||||
|
||||
// If we already received a ticcmd for this tic, just submit it for the next one.
|
||||
tic_t faketic = maketic;
|
||||
|
||||
if (!!(netcmds[maketic % BACKUPTICS][netconsole].flags & TICCMD_RECEIVED))
|
||||
faketic++;
|
||||
|
||||
// Copy ticcmd
|
||||
G_MoveTiccmd(&netcmds[maketic%BACKUPTICS][netconsole], &netbuffer->u.clientpak.cmd, 1);
|
||||
G_MoveTiccmd(&netcmds[faketic%BACKUPTICS][netconsole], &netbuffer->u.clientpak.cmd, 1);
|
||||
|
||||
// Check ticcmd for "speed hacks"
|
||||
if (CheckForSpeedHacks((UINT8)netconsole))
|
||||
|
|
@ -5183,7 +5189,7 @@ static void HandlePacketFromPlayer(SINT8 node)
|
|||
|| (netbuffer->packettype == PT_CLIENT4CMD || netbuffer->packettype == PT_CLIENT4MIS))
|
||||
&& (nodetoplayer2[node] >= 0))
|
||||
{
|
||||
G_MoveTiccmd(&netcmds[maketic%BACKUPTICS][(UINT8)nodetoplayer2[node]],
|
||||
G_MoveTiccmd(&netcmds[faketic%BACKUPTICS][(UINT8)nodetoplayer2[node]],
|
||||
&netbuffer->u.client2pak.cmd2, 1);
|
||||
|
||||
if (CheckForSpeedHacks((UINT8)nodetoplayer2[node]))
|
||||
|
|
@ -5194,7 +5200,7 @@ static void HandlePacketFromPlayer(SINT8 node)
|
|||
|| (netbuffer->packettype == PT_CLIENT4CMD || netbuffer->packettype == PT_CLIENT4MIS))
|
||||
&& (nodetoplayer3[node] >= 0))
|
||||
{
|
||||
G_MoveTiccmd(&netcmds[maketic%BACKUPTICS][(UINT8)nodetoplayer3[node]],
|
||||
G_MoveTiccmd(&netcmds[faketic%BACKUPTICS][(UINT8)nodetoplayer3[node]],
|
||||
&netbuffer->u.client3pak.cmd3, 1);
|
||||
|
||||
if (CheckForSpeedHacks((UINT8)nodetoplayer3[node]))
|
||||
|
|
@ -5204,7 +5210,7 @@ static void HandlePacketFromPlayer(SINT8 node)
|
|||
if ((netbuffer->packettype == PT_CLIENT4CMD || netbuffer->packettype == PT_CLIENT4MIS)
|
||||
&& (nodetoplayer4[node] >= 0))
|
||||
{
|
||||
G_MoveTiccmd(&netcmds[maketic%BACKUPTICS][(UINT8)nodetoplayer4[node]],
|
||||
G_MoveTiccmd(&netcmds[faketic%BACKUPTICS][(UINT8)nodetoplayer4[node]],
|
||||
&netbuffer->u.client4pak.cmd4, 1);
|
||||
|
||||
if (CheckForSpeedHacks((UINT8)nodetoplayer4[node]))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue