cvar_t m_filter = {CVAR_SAVE, "m_filter","0", "smoothes mouse movement, less responsive but smoother aiming"};
-cvar_t cl_netinputpacketsperserverpacket = {CVAR_SAVE, "cl_netinputpacketsperserverpacket", "1.0", "send this many input packets per server packet received"};
-cvar_t cl_netinputpacketspersecond = {CVAR_SAVE, "cl_netinputpacketspersecond","20", "how many input packets to send to server each second (only used on old servers, and note this is multiplied by cl_netinputpacketsperserverpacket)"};
-cvar_t cl_netinputpacketspersecond_qw = {CVAR_SAVE, "cl_netinputpacketspersecond_qw","72", "how many input packets to send to a qw server each second (only used on qw servers)"};
-cvar_t cl_netinputpacketlosstolerance = {CVAR_SAVE, "cl_netinputpacketlosstolerance", "1", "how many packets in a row can be lost without movement issues when using cl_movement (technically how many input messages to repeat in each packet that have not yet been acknowledged by the server), only affects DP7 and later servers (Quake uses 0, QuakeWorld uses 2, and just for comparison Quake3 uses 1)"};
+cvar_t cl_netfps = {CVAR_SAVE, "cl_netfps","60", "how many input packets to send to server each second"};
+cvar_t cl_netrepeatinput = {CVAR_SAVE, "cl_netrepeatinput", "1", "how many packets in a row can be lost without movement issues when using cl_movement (technically how many input messages to repeat in each packet that have not yet been acknowledged by the server), only affects DP7 and later servers (Quake uses 0, QuakeWorld uses 2, and just for comparison Quake3 uses 1)"};
cvar_t cl_nodelta = {0, "cl_nodelta", "0", "disables delta compression of non-player entities in QW network protocol"};
extern cvar_t slowmo;
void CL_UpdateMoveVars(void)
{
+ cl.movevars_packetinterval = 1.0 / bound(1, cl_netfps.value, 1000);
if (cls.protocol == PROTOCOL_QUAKEWORLD)
- cl.movevars_packetinterval = 1.0 / bound(1, cl_netinputpacketspersecond_qw.value, 100);
+ {
+ }
else if (cl.stats[STAT_MOVEVARS_TICRATE])
{
- cl.movevars_packetinterval = cl.statsf[STAT_MOVEVARS_TICRATE] * cl.statsf[STAT_MOVEVARS_TIMESCALE] / bound(1, cl_netinputpacketsperserverpacket.value, 10);
+ cl.movevars_packetinterval *= cl.statsf[STAT_MOVEVARS_TIMESCALE];
cl.movevars_timescale = cl.statsf[STAT_MOVEVARS_TIMESCALE];
cl.movevars_gravity = cl.statsf[STAT_MOVEVARS_GRAVITY];
cl.movevars_stopspeed = cl.statsf[STAT_MOVEVARS_STOPSPEED] ;
}
else
{
- cl.movevars_packetinterval = slowmo.value / bound(1, cl_netinputpacketspersecond.value, 100);
+ cl.movevars_packetinterval *= slowmo.value;
cl.movevars_timescale = slowmo.value;
cl.movevars_gravity = sv_gravity.value;
cl.movevars_stopspeed = cl_movement_stopspeed.value;
CL_ClientMovement_Input((cl.movecmd[0].buttons & 2) != 0, (cl.movecmd[0].buttons & 16) != 0);
// set the maxusercmds variable to limit how many should be sent
- maxusercmds = bound(1, cl_netinputpacketlosstolerance.integer + 1, CL_MAX_USERCMDS);
+ maxusercmds = bound(1, cl_netrepeatinput.integer + 1, CL_MAX_USERCMDS);
// when movement prediction is off, there's not much point in repeating old input as it will just be ignored
if (!cl.cmd.predicted)
maxusercmds = 1;
Cvar_RegisterVariable(&in_pitch_max);
Cvar_RegisterVariable(&m_filter);
- Cvar_RegisterVariable(&cl_netinputpacketsperserverpacket);
- Cvar_RegisterVariable(&cl_netinputpacketspersecond);
- Cvar_RegisterVariable(&cl_netinputpacketspersecond_qw);
- Cvar_RegisterVariable(&cl_netinputpacketlosstolerance);
+ Cvar_RegisterVariable(&cl_netfps);
+ Cvar_RegisterVariable(&cl_netrepeatinput);
Cvar_RegisterVariable(&cl_nodelta);
}