]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
disabled cl_movement prediction when cls.servermovesequence is 0 (either a protocol...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 15 Mar 2007 14:06:03 +0000 (14:06 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 15 Mar 2007 14:06:03 +0000 (14:06 +0000)
removed cl_movement_latency cvar as it no longer serves any purpose with the removal of support for prediction on unsynchronized move protocols

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6984 d7cf8633-e32d-0410-b094-e92efae38249

cl_input.c
darkplaces.txt

index 569740bb829dcc79f05875acd3ab403a1d761b92..56062c77906f7297f983e1d2928fc9551ddb0e5b 100644 (file)
@@ -320,7 +320,6 @@ cvar_t cl_pitchspeed = {CVAR_SAVE, "cl_pitchspeed","150","keyboard pitch turning
 cvar_t cl_anglespeedkey = {CVAR_SAVE, "cl_anglespeedkey","1.5","how much +speed multiplies keyboard turning speed"};
 
 cvar_t cl_movement = {CVAR_SAVE, "cl_movement", "0", "enables clientside prediction of your player movement"};
-cvar_t cl_movement_latency = {0, "cl_movement_latency", "0", "compensates for this much latency (ping time) on quake servers which do not really support prediction, no effect on darkplaces7 protocol servers or quakeworld servers"};
 cvar_t cl_movement_maxspeed = {0, "cl_movement_maxspeed", "320", "how fast you can move (should match sv_maxspeed)"};
 cvar_t cl_movement_maxairspeed = {0, "cl_movement_maxairspeed", "30", "how fast you can move while in the air (should match sv_maxairspeed)"};
 cvar_t cl_movement_stopspeed = {0, "cl_movement_stopspeed", "100", "speed below which you will be slowed rapidly to a stop rather than sliding endlessly (should match sv_stopspeed)"};
@@ -616,16 +615,6 @@ void CL_ClientMovement_Input(qboolean buttonjump, qboolean buttoncrouch)
                                cl.movement_replay_canjump = !cl.movement_queue[i].jump; // FIXME: this logic is quite broken
                }
        }
-       else
-       {
-               for (i = 0;i < n;i++)
-               {
-                       if (cl.movement_queue[i].time >= cl.movecmd[0].time - cl_movement_latency.value / 1000.0 && cl.movement_queue[i].time <= cl.movecmd[0].time)
-                               cl.movement_queue[cl.movement_numqueue++] = cl.movement_queue[i];
-                       else if (i == 0)
-                               cl.movement_replay_canjump = !cl.movement_queue[i].jump; // FIXME: this logic is quite broken
-               }
-       }
        // add to input queue if there is room
        if (cl.movement_numqueue < (int)(sizeof(cl.movement_queue)/sizeof(cl.movement_queue[0])))
        {
@@ -1147,7 +1136,7 @@ void CL_ClientMovement_Replay(void)
                s.movevars_airaccel_sideways_friction = cl_movement_airaccel_sideways_friction.value;
        }
 
-       cl.movement_predicted = (cl_movement.integer && !cls.demoplayback && cls.signon == SIGNONS && cl.stats[STAT_HEALTH] > 0 && !cl.intermission) && ((cls.protocol != PROTOCOL_DARKPLACES6 && cls.protocol != PROTOCOL_DARKPLACES7) || cls.servermovesequence);
+       cl.movement_predicted = cls.servermovesequence && (cl_movement.integer && !cls.demoplayback && cls.signon == SIGNONS && cl.stats[STAT_HEALTH] > 0 && !cl.intermission);
        if (cl.movement_predicted)
        {
                //Con_Printf("%f: ", cl.movecmd[0].time);
@@ -1676,7 +1665,6 @@ void CL_InitInput (void)
        Cmd_AddCommand ("bestweapon", IN_BestWeapon, "send an impulse number to server to select the first usable weapon out of several (example: 87654321)");
 
        Cvar_RegisterVariable(&cl_movement);
-       Cvar_RegisterVariable(&cl_movement_latency);
        Cvar_RegisterVariable(&cl_movement_maxspeed);
        Cvar_RegisterVariable(&cl_movement_maxairspeed);
        Cvar_RegisterVariable(&cl_movement_stopspeed);
index 8f4908b3146128863e1306d567582089bbcd1994..3b246d4134d3c5312b8019c80e57fbba46be5ed9 100644 (file)
@@ -427,7 +427,6 @@ cl_movement_airaccelerate                         -1                  how fast y
 cl_movement_edgefriction                          2                   how much to slow down when you may be about to fall off a ledge (should match edgefriction)\r
 cl_movement_friction                              4                   how fast you slow down (should match sv_friction)\r
 cl_movement_jumpvelocity                          270                 how fast you move upward when you begin a jump (should match the quakec code)\r
-cl_movement_latency                               0                   compensates for this much latency (ping time) on quake servers which do not really support prediction, no effect on darkplaces7 protocol servers or quakeworld servers\r
 cl_movement_maxairspeed                           30                  how fast you can move while in the air (should match sv_maxairspeed)\r
 cl_movement_maxspeed                              320                 how fast you can move (should match sv_maxspeed)\r
 cl_movement_stepheight                            18                  how tall a step you can step in one instant (should match sv_stepheight)\r