Skip to content

Commit

Permalink
MP: Move client low rate warning to engine
Browse files Browse the repository at this point in the history
This allows the warning to display regardless of the client mod being used.
  • Loading branch information
ensiform committed May 16, 2017
1 parent 6aba690 commit 36b6759
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 0 additions & 4 deletions codemp/cgame/cg_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2620,10 +2620,6 @@ Ghoul2 Insert End
cg.distanceCull = trap->R_GetDistanceCull();

CG_ParseEntitiesFromString();

trap->Cvar_VariableStringBuffer( "rate", buf, sizeof( buf ) );
if ( atoi( buf ) == 4000 )
trap->Print( "^3WARNING: Default /rate value detected. Suggest typing /rate 25000 for a smoother connection!\n" );
}

//makes sure returned string is in localized format
Expand Down
5 changes: 5 additions & 0 deletions codemp/client/cl_cgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,11 @@ void CL_InitCGame( void ) {
// otherwise server commands sent just before a gamestate are dropped
CGVM_Init( clc.serverMessageSequence, clc.lastExecutedServerCommand, clc.clientNum );

int clRate = Cvar_VariableIntegerValue( "rate" );
if ( clRate == 4000 ) {
Com_Printf( S_COLOR_YELLOW "WARNING: Old default /rate value detected (4000). Suggest typing /rate 25000 into console for a smoother connection!\n" );
}

// reset any CVAR_CHEAT cvars registered by cgame
if ( !clc.demoplaying && !cl_connectedToCheatServer )
Cvar_SetCheatState();
Expand Down

0 comments on commit 36b6759

Please sign in to comment.