From: havoc Date: Mon, 3 Mar 2008 13:55:53 +0000 (+0000) Subject: removed cl_netinputpacketsperserverpacket (now uses X-Git-Tag: xonotic-v0.1.0preview~2337 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5dddc99a3d010758e27331745a203649d8a1329e;p=xonotic%2Fdarkplaces.git removed cl_netinputpacketsperserverpacket (now uses cl_netinputpacketspersecond again) removed cl_netinputpacketspersecond_qw (now uses the main one) renamed cl_netinputpacketspersecond to cl_netfps renamed cl_netinputpacketlosstolerance to cl_netrepeatinput changed default cl_netfps to 60 (from 20) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8188 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_input.c b/cl_input.c index b594e933..89682c86 100644 --- a/cl_input.c +++ b/cl_input.c @@ -442,10 +442,8 @@ cvar_t in_pitch_max = {0, "in_pitch_max", "90", "how far upward you can aim (qua 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"}; @@ -1146,11 +1144,13 @@ void CL_ClientMovement_PlayerMove(cl_clientmovement_state_t *s) 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] ; @@ -1172,7 +1172,7 @@ void CL_UpdateMoveVars(void) } 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; @@ -1564,7 +1564,7 @@ void CL_SendMove(void) 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; @@ -1753,10 +1753,8 @@ void CL_InitInput (void) 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); }