[openjk] 08/15: MP: Move client low rate warning to engine

Simon McVittie smcv at debian.org
Thu Jun 15 10:28:40 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian/master
in repository openjk.

commit 36b675920981d0e964cbc9c93cc7255eefdc4c3b
Author: Ensiform <ensiform at gmail.com>
Date:   Tue May 16 14:35:04 2017 -0500

    MP: Move client low rate warning to engine
    
    This allows the warning to display regardless of the client mod being used.
---
 codemp/cgame/cg_main.c     | 4 ----
 codemp/client/cl_cgame.cpp | 5 +++++
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/codemp/cgame/cg_main.c b/codemp/cgame/cg_main.c
index 6ae4609..d92b35b 100644
--- a/codemp/cgame/cg_main.c
+++ b/codemp/cgame/cg_main.c
@@ -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
diff --git a/codemp/client/cl_cgame.cpp b/codemp/client/cl_cgame.cpp
index 65a96f4..8d228f1 100644
--- a/codemp/client/cl_cgame.cpp
+++ b/codemp/client/cl_cgame.cpp
@@ -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();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/openjk.git



More information about the Pkg-games-commits mailing list