mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: server: do not continue processing command if the player was kicked during it (for example, by speedhack prevention)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user