From 83c3521271428c3e18a0d9b61766f336dc4f7eb3 Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 15 Mar 2007 14:06:03 +0000 Subject: [PATCH] disabled cl_movement prediction when cls.servermovesequence is 0 (either a protocol that does not support move synchronization, or prediction is disabled) 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 | 14 +------------- darkplaces.txt | 1 - 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/cl_input.c b/cl_input.c index 569740bb..56062c77 100644 --- a/cl_input.c +++ b/cl_input.c @@ -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); diff --git a/darkplaces.txt b/darkplaces.txt index 8f4908b3..3b246d41 100644 --- a/darkplaces.txt +++ b/darkplaces.txt @@ -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) cl_movement_friction 4 how fast you slow down (should match sv_friction) cl_movement_jumpvelocity 270 how fast you move upward when you begin a jump (should match the quakec code) -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 cl_movement_maxairspeed 30 how fast you can move while in the air (should match sv_maxairspeed) cl_movement_maxspeed 320 how fast you can move (should match sv_maxspeed) cl_movement_stepheight 18 how tall a step you can step in one instant (should match sv_stepheight) -- 2.39.2