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)"};
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])))
{
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);
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);
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