From: havoc Date: Sun, 29 May 2005 06:17:40 +0000 (+0000) Subject: fix bug causing impulses to often be lost X-Git-Tag: xonotic-v0.1.0preview~4836 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c601878023c4b57a02391e30db730a200402bfe1;p=xonotic%2Fdarkplaces.git fix bug causing impulses to often be lost git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5346 d7cf8633-e32d-0410-b094-e92efae38249 --- 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);