]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_input.c
ignore first mouse move after mouse grab as it's generally garbage
[xonotic/darkplaces.git] / cl_input.c
index f8593c2e38fb7fbc00184e5c0c7cd12bf439dc24..e528439750445557a09ec2aa5fda98349b9046a2 100644 (file)
@@ -244,8 +244,6 @@ cvar_t cl_pitchspeed = {CVAR_SAVE, "cl_pitchspeed","150"};
 
 cvar_t cl_anglespeedkey = {CVAR_SAVE, "cl_anglespeedkey","1.5"};
 
-cvar_t cl_nodelta = {0, "cl_nodelta", "0"};
-
 /*
 ================
 CL_AdjustAngles
@@ -424,41 +422,13 @@ void CL_SendMove(usercmd_t *cmd)
        MSG_WriteByte (&buf, in_impulse);
        in_impulse = 0;
 
-       if (cl.protocol == PROTOCOL_DARKPLACES1 || cl.protocol == PROTOCOL_DARKPLACES2 || cl.protocol == PROTOCOL_DARKPLACES3)
-       {
-               // LordHavoc: should we ack this on receipt instead?  would waste net bandwidth though
-               if (cl.entitydatabase)
-               {
-                       i = EntityFrame_MostRecentlyRecievedFrameNum(cl.entitydatabase);
-                       if (i > 0)
-                       {
-                               MSG_WriteByte(&buf, clc_ackentities);
-                               MSG_WriteLong(&buf, i);
-                       }
-               }
-       }
-       else if (cl.protocol == PROTOCOL_DARKPLACES4)
+       // FIXME: should ack latest 3 frames perhaps?
+       if (cl.latestframenum > 0)
        {
-               if (cl.entitydatabase4)
-               {
-                       i = cl.entitydatabase4->ackframenum;
-                       if (cl_nodelta.integer)
-                               i = -1;
-                       if (developer_networkentities.integer >= 1)
-                               Con_Printf("send clc_ackentities %i\n", i);
-                       MSG_WriteByte(&buf, clc_ackentities);
-                       MSG_WriteLong(&buf, i);
-               }
-       }
-       else if (cl.protocol == PROTOCOL_DARKPLACES5)
-       {
-               i = cl.latestframenum;
-               if (cl_nodelta.integer)
-                       i = -1;
                if (developer_networkentities.integer >= 1)
-                       Con_Printf("send clc_ackentities %i\n", i);
+                       Con_Printf("send clc_ackentities %i\n", cl.latestframenum);
                MSG_WriteByte(&buf, clc_ackentities);
-               MSG_WriteLong(&buf, i);
+               MSG_WriteLong(&buf, cl.latestframenum);
        }
 
        // deliver the message
@@ -531,7 +501,5 @@ void CL_InitInput (void)
        Cmd_AddCommand ("-button7", IN_Button7Up);
        Cmd_AddCommand ("+button8", IN_Button8Down);
        Cmd_AddCommand ("-button8", IN_Button8Up);
-
-       Cvar_RegisterVariable(&cl_nodelta);
 }