Applied Mads' speed cheat fix to qw-server

This commit is contained in:
Joseph Carter 2000-01-05 22:41:36 +00:00
parent 9e5e83cc73
commit 368ae283a2
2 changed files with 19 additions and 3 deletions

View File

@ -62,12 +62,16 @@ Svgalib fixes/optimizations:
GGI support:
Marcus Sundberg <mackan@stacken.kth.se>
SDL Support:
SDL support:
Sam Lantinga <slouken@devolution.com>
Maas van den Berg <email@dds.nl>
X11 software renderer fixes:
Justin A. McCright <jam@qIj.damogran.org>
GL Fullbright Support:
GL fullbright Support:
Neal White III <nwhite@softblox.com>
Cheat/exploit fixes:
Mads Bondo Dydensborg <madsdyd@challenge.dk>

View File

@ -1357,7 +1357,7 @@ void SV_PreRunCmd(void)
{
memset(playertouch, 0, sizeof(playertouch));
}
/*
===========
SV_RunCmd
@ -1369,6 +1369,18 @@ void SV_RunCmd (usercmd_t *ucmd)
int i, n;
int oldmsec;
//MBD: The id client limits msec to 100.
if (ucmd->msec > 100) {
Con_Printf("Speed cheat detected for player %s\n",
host_client->name);
// We want to punish people that tries to do this. Let us
// set their fps to 1000
ucmd->msec = 1;
// This has the added benefit that the server eventually will
// KICK the player, calling him a timedemo cheater.
// Neat, huh? :-)
}
cmd = *ucmd;
// chop up very long commands