Module darkplaces: Change committed
havoc at icculus.org
havoc at icculus.org
Thu Mar 15 10:06:13 EDT 2007
Commiter : havoc
CVSROOT : /cvs/cvsroot/twilight
Module : darkplaces
Commit time: 2007-03-15 14:06:13 UTC
Log message:
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
Modified files:
cl_input.c darkplaces.txt
------=MIME.8f7b686edd63c127c6b9afdec5bbd67b
Content-Type: text/plain; name="darkplaces.20070315.140613.havoc.diff"
Content-Disposition: attachment; filename="darkplaces.20070315.140613.havoc.diff"
Content-Transfer-Encoding: 8bit
Index: darkplaces/cl_input.c
diff -u darkplaces/cl_input.c:1.122 darkplaces/cl_input.c:1.123
--- darkplaces/cl_input.c:1.122 Mon Mar 12 01:58:28 2007
+++ darkplaces/cl_input.c Thu Mar 15 10:06:03 2007
@@ -320,7 +320,6 @@
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 @@
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 @@
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 @@
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: darkplaces/darkplaces.txt
diff -u darkplaces/darkplaces.txt:1.30 darkplaces/darkplaces.txt:1.31
--- darkplaces/darkplaces.txt:1.30 Thu Mar 15 07:32:01 2007
+++ darkplaces/darkplaces.txt Thu Mar 15 10:06:03 2007
@@ -427,7 +427,6 @@
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)
More information about the twilight-commits
mailing list