From c2ca80c88997fadd3e49d08420ec6100d63e0d6e Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Wed, 30 Oct 2024 18:11:45 +0300 Subject: [PATCH] engine: client: don't immediately send client packet after receiveing server packet or full update It doesn't seem to be useful for anything. Instead, it completely breaks cl_cmdrate behavior, constantly spamming server with move commands --- engine/client/cl_frame.c | 1 - engine/client/cl_main.c | 7 ------- engine/client/cl_parse_gs.c | 1 - engine/client/client.h | 1 - 4 files changed, 10 deletions(-) diff --git a/engine/client/cl_frame.c b/engine/client/cl_frame.c index 1d6368d6..60d23be7 100644 --- a/engine/client/cl_frame.c +++ b/engine/client/cl_frame.c @@ -872,7 +872,6 @@ int CL_ParsePacketEntities( sizebuf_t *msg, qboolean delta, connprotocol_t proto // this is a full update that we can start delta compressing from now oldframe = NULL; oldpacket = -1; // delta too old or is initial message - cl.send_reply = true; // send reply cls.demowaiting = false; // we can start recording now } diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index 82b71b06..762dc96f 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -789,12 +789,6 @@ static void CL_WritePacket( void ) if(( host.realtime >= cls.nextcmdtime ) && Netchan_CanPacket( &cls.netchan, true )) send_command = true; - if( cl.send_reply ) - { - cl.send_reply = false; - send_command = true; - } - // spectator is not sending cmds to server if( cls.spectator && cls.state == ca_active && cl.delta_sequence == cl.validsequence ) { @@ -2774,7 +2768,6 @@ static void CL_ReadNetMessage( void ) } CL_ParseNetMessage( &net_message, parsefn ); - cl.send_reply = true; } // build list of all solid entities per next frame (exclude clients) diff --git a/engine/client/cl_parse_gs.c b/engine/client/cl_parse_gs.c index b0d2ecff..37050200 100644 --- a/engine/client/cl_parse_gs.c +++ b/engine/client/cl_parse_gs.c @@ -294,7 +294,6 @@ static int CL_ParsePacketEntitiesGS( sizebuf_t *msg, qboolean delta ) else { oldframe = NULL; - cl.send_reply = true; cls.demowaiting = false; } diff --git a/engine/client/client.h b/engine/client/client.h index c31380f7..ebf2a370 100644 --- a/engine/client/client.h +++ b/engine/client/client.h @@ -211,7 +211,6 @@ typedef struct int last_command_ack; int last_incoming_sequence; - qboolean send_reply; qboolean background; // not real game, just a background qboolean first_frame; // first rendering frame qboolean proxy_redirect; // spectator stuff