]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix bug causing impulses to often be lost
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 29 May 2005 06:17:40 +0000 (06:17 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 29 May 2005 06:17:40 +0000 (06:17 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5346 d7cf8633-e32d-0410-b094-e92efae38249

sv_user.c

index ef51038a78dc5b1306245d75e5ee824edd00cd05..6566bf3e2bd5c16e05392d244ff437165653c908 100644 (file)
--- 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);