From 91e056dc2ffccd9533c24a9cf5b64ae6251762d1 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sat, 20 Nov 2004 00:52:49 +0000 Subject: [PATCH] NQ clients wern't working properly. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@481 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/server/sv_user.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/engine/server/sv_user.c b/engine/server/sv_user.c index 412efdd59..3837d7d52 100644 --- a/engine/server/sv_user.c +++ b/engine/server/sv_user.c @@ -957,10 +957,6 @@ void SV_PreSpawn_f (void) MSG_WriteByte(&host_client->netchan.message, ctent->dlighttime); } } - else - { - - } } } else @@ -4294,9 +4290,11 @@ void SVNQ_ReadClientMove (usercmd_t *move) // read current angles for (i=0 ; i<3 ; i++) - move->angles[i] = MSG_ReadAngle (); + { + host_client->edict->v.v_angle[i] = MSG_ReadAngle (); - VectorCopy (move->angles, host_client->edict->v.v_angle); + move->angles[i] = (host_client->edict->v.v_angle[i] * 256*256)/360; + } // read movement move->forwardmove = MSG_ReadShort (); @@ -4312,6 +4310,24 @@ void SVNQ_ReadClientMove (usercmd_t *move) i = MSG_ReadByte (); if (i) move->impulse = i; + + + + + if (i && SV_FiltureImpulse(i, host_client->trustlevel)) + host_client->edict->v.impulse = i; + + host_client->edict->v.button0 = bits & 1; + host_client->edict->v.button2 = (bits >> 1) & 1; + if (pr_allowbutton1.value) //many mods use button1 - it's just a wasted field to many mods. So only work it if the cvar allows. + host_client->edict->v.button1 = ((bits >> 2) & 1); +// DP_INPUTBUTTONS + host_client->edict->v.button3 = ((bits >> 2) & 1); + host_client->edict->v.button4 = ((bits >> 3) & 1); + host_client->edict->v.button5 = ((bits >> 4) & 1); + host_client->edict->v.button6 = ((bits >> 5) & 1); + host_client->edict->v.button7 = ((bits >> 6) & 1); + host_client->edict->v.button8 = ((bits >> 7) & 1); } void SVNQ_ExecuteClientMessage (client_t *cl)