From 91f0bd860c7e03b0c605c00f097013aa042263d4 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sat, 20 Nov 2004 01:20:28 +0000 Subject: [PATCH] Fixed impulses on NQ servers, and a safty check for backwards running time. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@496 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/cl_input.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engine/client/cl_input.c b/engine/client/cl_input.c index 0586c4306..4a4ee8d65 100644 --- a/engine/client/cl_input.c +++ b/engine/client/cl_input.c @@ -590,7 +590,7 @@ void CLNQ_SendMove (usercmd_t *cmd, int pnum) { in_nextimpulse[pnum]++; in_impulsespending[pnum]--; - MSG_WriteByte(&buf, in_impulse[pnum][(in_nextimpulse[pnum])%IN_IMPULSECACHE]); + MSG_WriteByte(&buf, in_impulse[pnum][(in_nextimpulse[pnum]-1)%IN_IMPULSECACHE]); } else MSG_WriteByte (&buf, 0); @@ -792,6 +792,8 @@ void CL_SendCmd (void) if (msecs>1000) //come on... That's just stupid. msecs=255; + if (msecs<0) + msecs=0; //erm. msecstouse = (int)msecs; //casts round down.