Skip to content

Commit

Permalink
Increase default cl_maxpackets and snaps to 125
Browse files Browse the repository at this point in the history
This decreases latency if FPS is greater than or equal to 60
(since the previous default for `cl_maxpackets` was `60`), and
allows for more consistent input handling.

Increasing `snaps` further does not change anything on servers
running `sv_fps 20` or `sv_fps 40`, but it ensures you automatically
benefit from increased position update rates on servers running higher
`sv_fps`. This in turn allows you to see players' positions more accurately
compared to their real position on the server.
  • Loading branch information
Calinou committed Oct 17, 2024
1 parent 84f3130 commit 89b0f1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion code/client/cl_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,7 @@ void CL_InitInput( void ) {
cl_anglespeedkey = Cvar_Get( "cl_anglespeedkey", "1.5", 0 );
Cvar_SetDescription( cl_anglespeedkey, "Set the speed that the direction keys (not mouse) change the view angle." );

cl_maxpackets = Cvar_Get ("cl_maxpackets", "60", CVAR_ARCHIVE );
cl_maxpackets = Cvar_Get ("cl_maxpackets", "125", CVAR_ARCHIVE );
Cvar_CheckRange( cl_maxpackets, "15", "125", CV_INTEGER );
Cvar_SetDescription( cl_maxpackets, "Set how many client packets are sent to the server per second, can't exceed \\com_maxFPS." );
cl_packetdup = Cvar_Get( "cl_packetdup", "1", CVAR_ARCHIVE_ND );
Expand Down
2 changes: 1 addition & 1 deletion code/client/cl_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3971,7 +3971,7 @@ void CL_Init( void ) {
// userinfo
Cvar_Get ("name", "UnnamedPlayer", CVAR_USERINFO | CVAR_ARCHIVE_ND );
Cvar_Get ("rate", "25000", CVAR_USERINFO | CVAR_ARCHIVE );
Cvar_Get ("snaps", "40", CVAR_USERINFO | CVAR_ARCHIVE );
Cvar_Get ("snaps", "125", CVAR_USERINFO | CVAR_ARCHIVE );
Cvar_Get ("model", "sarge", CVAR_USERINFO | CVAR_ARCHIVE_ND );
Cvar_Get ("headmodel", "sarge", CVAR_USERINFO | CVAR_ARCHIVE_ND );
Cvar_Get ("team_model", "sarge", CVAR_USERINFO | CVAR_ARCHIVE_ND );
Expand Down

0 comments on commit 89b0f1e

Please sign in to comment.