remove this forgor i still had that here lol

This commit is contained in:
Alug committed 2024-09-13 13:30:10 +02:00
1 parent 169ee01338
commit 4bc1224d0c
1 file changed
+12 -18
+12 -18
View File
@@ -5084,11 +5084,11 @@ static void HandlePacketFromAwayNode(SINT8 node)
* \sa HandlePacketFromPlayer
*
*/
static boolean CheckForSpeedHacks(UINT8 p, tic_t faketic)
static boolean CheckForSpeedHacks(UINT8 p)
{
if (netcmds[faketic%TICQUEUE][p].forwardmove > MAXPLMOVE || netcmds[faketic%TICQUEUE][p].forwardmove < -MAXPLMOVE
|| netcmds[faketic%TICQUEUE][p].sidemove > MAXPLMOVE || netcmds[faketic%TICQUEUE][p].sidemove < -MAXPLMOVE
|| netcmds[faketic%TICQUEUE][p].driftturn > KART_FULLTURN || netcmds[faketic%TICQUEUE][p].driftturn < -KART_FULLTURN)
if (netcmds[maketic%TICQUEUE][p].forwardmove > MAXPLMOVE || netcmds[maketic%TICQUEUE][p].forwardmove < -MAXPLMOVE
|| netcmds[maketic%TICQUEUE][p].sidemove > MAXPLMOVE || netcmds[maketic%TICQUEUE][p].sidemove < -MAXPLMOVE
|| netcmds[maketic%TICQUEUE][p].driftturn > KART_FULLTURN || netcmds[maketic%TICQUEUE][p].driftturn < -KART_FULLTURN)
{
char buf[2];
CONS_Alert(CONS_WARNING, M_GetText("Illegal movement value received from node %d\n"), playernode[p]);
@@ -5185,12 +5185,6 @@ static void HandlePacketFromPlayer(SINT8 node)
// As long as clients send valid ticcmds, the server can keep running, so reset the timeout
/// \todo Use a separate cvar for that kind of timeout?
freezetimeout[node] = I_GetTime() + connectiontimeout;
// If we've alredy received a ticcmd for this tic, just submit it for the next one.
tic_t faketic = maketic;
if ((!!(netcmds[maketic % TICQUEUE][netconsole].angleturn & TICCMD_RECEIVED))
&& (maketic - firstticstosend < TICQUEUE - 1))
faketic++;
// Don't do anything for packets of type NODEKEEPALIVE?
// Sryder 2018/07/01: Update the freezetimeout still!
@@ -5199,10 +5193,10 @@ static void HandlePacketFromPlayer(SINT8 node)
break;
// Copy ticcmd
G_MoveTiccmd(&netcmds[faketic%TICQUEUE][netconsole], &netbuffer->u.clientpak.cmd, 1);
G_MoveTiccmd(&netcmds[maketic%TICQUEUE][netconsole], &netbuffer->u.clientpak.cmd, 1);
// Check ticcmd for "speed hacks"
if (CheckForSpeedHacks((UINT8)netconsole, faketic))
if (CheckForSpeedHacks((UINT8)netconsole))
break;
// Splitscreen cmd
@@ -5211,10 +5205,10 @@ static void HandlePacketFromPlayer(SINT8 node)
|| (netbuffer->packettype == PT_CLIENT4CMD || netbuffer->packettype == PT_CLIENT4MIS))
&& (nodetoplayer2[node] >= 0))
{
G_MoveTiccmd(&netcmds[faketic%TICQUEUE][(UINT8)nodetoplayer2[node]],
G_MoveTiccmd(&netcmds[maketic%TICQUEUE][(UINT8)nodetoplayer2[node]],
&netbuffer->u.client2pak.cmd2, 1);
if (CheckForSpeedHacks((UINT8)nodetoplayer2[node], faketic))
if (CheckForSpeedHacks((UINT8)nodetoplayer2[node]))
break;
}
@@ -5222,20 +5216,20 @@ static void HandlePacketFromPlayer(SINT8 node)
|| (netbuffer->packettype == PT_CLIENT4CMD || netbuffer->packettype == PT_CLIENT4MIS))
&& (nodetoplayer3[node] >= 0))
{
G_MoveTiccmd(&netcmds[faketic%TICQUEUE][(UINT8)nodetoplayer3[node]],
G_MoveTiccmd(&netcmds[maketic%TICQUEUE][(UINT8)nodetoplayer3[node]],
&netbuffer->u.client3pak.cmd3, 1);
if (CheckForSpeedHacks((UINT8)nodetoplayer3[node], faketic))
if (CheckForSpeedHacks((UINT8)nodetoplayer3[node]))
break;
}
if ((netbuffer->packettype == PT_CLIENT4CMD || netbuffer->packettype == PT_CLIENT4MIS)
&& (nodetoplayer4[node] >= 0))
{
G_MoveTiccmd(&netcmds[faketic%TICQUEUE][(UINT8)nodetoplayer4[node]],
G_MoveTiccmd(&netcmds[maketic%TICQUEUE][(UINT8)nodetoplayer4[node]],
&netbuffer->u.client4pak.cmd4, 1);
if (CheckForSpeedHacks((UINT8)nodetoplayer4[node], faketic))
if (CheckForSpeedHacks((UINT8)nodetoplayer4[node]))
break;
}