engine: server: do not continue processing command if the player was kicked during it (for example, by speedhack prevention)
This commit is contained in:
parent
7222830b28
commit
29c8818557
2 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue