Fixed Molgrum's speed cheat.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2504 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2007-05-26 00:39:03 +00:00
parent 7047299e31
commit b95f1f3c76
2 changed files with 11 additions and 5 deletions

View file

@ -1088,7 +1088,7 @@ CL_SendCmd
=================
*/
vec3_t accum[MAX_SPLITS];
void CL_SendCmd (float frametime)
void CL_SendCmd (double frametime)
{
extern cvar_t cl_indepphysics;
sizebuf_t buf;
@ -1105,7 +1105,7 @@ void CL_SendCmd (float frametime)
static float pps_balance = 0;
static int dropcount = 0;
static float msecs;
static double msecs;
int msecstouse;
qboolean dontdrop=false;
@ -1229,15 +1229,21 @@ void CL_SendCmd (float frametime)
}
if (cl_netfps.value && !cl_indepphysics.value)
{
{//this chunk of code is here to stop the client from using too few msecs per packet
int spare;
spare = CL_FilterTime(msecstouse, cl_netfps.value<=0?cl_maxfps.value:cl_netfps.value);
if (!spare && msecstouse<255 && cls.state == ca_active)
{
return;
}
if (spare > 10)
spare = 10;
if (spare > 0)
{
msecstouse -= spare;
for (plnum = 0; plnum < cl.splitclients; plnum++)
independantphysics[plnum].msec = msecstouse;
}
}
#ifdef NQPROT
@ -1326,7 +1332,7 @@ void CL_SendCmd (float frametime)
lightlev = 0;
}
msecs -= msecstouse;
msecs = msecs - (double)msecstouse;
firstsize=0;
for (plnum = 0; plnum<clientcount; plnum++)
{

View file

@ -707,7 +707,7 @@ void CL_MakeActive(char *gamename);
void CL_RegisterSplitCommands(void);
void CL_InitInput (void);
void CL_SendCmd (float frametime);
void CL_SendCmd (double frametime);
void CL_SendMove (usercmd_t *cmd);
#ifdef NQPROT
void CL_ParseTEnt (qboolean nqprot);