From c601878023c4b57a02391e30db730a200402bfe1 Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 29 May 2005 06:17:40 +0000 Subject: [PATCH] fix bug causing impulses to often be lost git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5346 d7cf8633-e32d-0410-b094-e92efae38249 --- sv_user.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sv_user.c b/sv_user.c index ef51038a..6566bf3e 100644 --- a/sv_user.c +++ b/sv_user.c @@ -649,9 +649,7 @@ void SV_ReadClientMove (void) if (msg_badread) Con_Printf("SV_ReadClientMessage: badread at %s:%i\n", __FILE__, __LINE__); // read impulse - i = MSG_ReadByte (); - if (i) - move->impulse = i; + move->impulse = MSG_ReadByte (); if (msg_badread) Con_Printf("SV_ReadClientMessage: badread at %s:%i\n", __FILE__, __LINE__); // PRYDON_CLIENTCURSOR @@ -714,7 +712,8 @@ void SV_ApplyClientMove (void) // set the edict fields host_client->edict->fields.server->button0 = move->buttons & 1; host_client->edict->fields.server->button2 = (move->buttons & 2)>>1; - host_client->edict->fields.server->impulse = move->impulse; + if (move->impulse) + host_client->edict->fields.server->impulse = move->impulse; VectorCopy(move->viewangles, host_client->edict->fields.server->v_angle); if ((val = PRVM_GETEDICTFIELDVALUE(host_client->edict, eval_button3))) val->_float = ((move->buttons >> 2) & 1); if ((val = PRVM_GETEDICTFIELDVALUE(host_client->edict, eval_button4))) val->_float = ((move->buttons >> 3) & 1); -- 2.39.2