engine: server: do not continue processing command if the player was kicked during it (for example, by speedhack prevention)

This commit is contained in:
Alibek Omarov 2025-03-01 14:57:48 +03:00
parent 7222830b28
commit 29c8818557
2 changed files with 8 additions and 0 deletions

View file

@ -3328,6 +3328,10 @@ static void SV_ParseClientMove( sv_client_t *cl, sizebuf_t *msg )
SV_RunCmd( cl, &cmds[i], cl->netchan.incoming_sequence - i );
}
// was player kicked? stop here
if( cl->state <= cs_zombie )
return;
cl->lastcmd = cmds[0];
// adjust latency time by 1/2 last client frame since

View file

@ -892,6 +892,10 @@ void SV_RunCmd( sv_client_t *cl, usercmd_t *ucmd, int random_seed )
vec3_t oldvel;
usercmd_t cmd;
// if the player got kicked, do not process commands
if( cl->state <= cs_zombie )
return;
clent = cl->edict;
cmd = *ucmd;