]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_user.c
fix some warnings
[xonotic/darkplaces.git] / sv_user.c
index 7e8ea45a1019282a1702512f6b4c619f158ad84b..23a98966a07ccb2842698a8ef539d7586e6e1dbd 100644 (file)
--- a/sv_user.c
+++ b/sv_user.c
@@ -38,12 +38,12 @@ SV_SetIdealPitch
 #define        MAX_FORWARD     6
 void SV_SetIdealPitch (void)
 {
-       float   angleval, sinval, cosval;
+       float   angleval, sinval, cosval, step, dir;
        trace_t tr;
        vec3_t  top, bottom;
        float   z[MAX_FORWARD];
        int             i, j;
-       int             step, dir, steps;
+       int             steps;
 
        if (!((int)host_client->edict->fields.server->flags & FL_ONGROUND))
                return;
@@ -748,6 +748,8 @@ void SV_ApplyClientMove (void)
        host_client->edict->fields.server->button2 = (move->buttons & 2)>>1;
        if (move->impulse)
                host_client->edict->fields.server->impulse = move->impulse;
+       // only send the impulse to qc once
+       move->impulse = 0;
        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);