From abe85940aee47cd652ca6cc7008fa56466f26475 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Mon, 22 Aug 2011 20:30:45 +0000 Subject: [PATCH] Disabled getting motd from update server in standalone build. --- code/client/cl_main.c | 8 ++++++++ code/qcommon/qcommon.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/code/client/cl_main.c b/code/client/cl_main.c index deaa4120..fd83db46 100644 --- a/code/client/cl_main.c +++ b/code/client/cl_main.c @@ -55,7 +55,9 @@ cvar_t *cl_nodelta; cvar_t *cl_debugMove; cvar_t *cl_noprint; +#ifdef UPDATE_SERVER_NAME cvar_t *cl_motd; +#endif cvar_t *rcon_client_password; cvar_t *rconAddress; @@ -1522,6 +1524,7 @@ CL_RequestMotd =================== */ void CL_RequestMotd( void ) { +#ifdef UPDATE_SERVER_NAME char info[MAX_INFO_STRING]; if ( !cl_motd->integer ) { @@ -1547,6 +1550,7 @@ void CL_RequestMotd( void ) { Info_SetValueForKey( info, "version", com_version->string ); NET_OutOfBandPrint( NS_CLIENT, cls.updateServer, "getmotd \"%s\"\n", info ); +#endif } /* @@ -2408,6 +2412,7 @@ CL_MotdPacket =================== */ void CL_MotdPacket( netadr_t from ) { +#ifdef UPDATE_SERVER_NAME char *challenge; char *info; @@ -2428,6 +2433,7 @@ void CL_MotdPacket( netadr_t from ) { Q_strncpyz( cls.updateInfoString, info, sizeof( cls.updateInfoString ) ); Cvar_Set( "cl_motdString", challenge ); +#endif } /* @@ -3439,7 +3445,9 @@ void CL_Init( void ) { // register our variables // cl_noprint = Cvar_Get( "cl_noprint", "0", 0 ); +#ifdef UPDATE_SERVER_NAME cl_motd = Cvar_Get ("cl_motd", "1", 0); +#endif cl_timeout = Cvar_Get ("cl_timeout", "200", 0); diff --git a/code/qcommon/qcommon.h b/code/qcommon/qcommon.h index eb5e45a7..1e844fc2 100644 --- a/code/qcommon/qcommon.h +++ b/code/qcommon/qcommon.h @@ -260,7 +260,9 @@ PROTOCOL // NOTE: that stuff only works with two digits protocols extern int demo_protocols[]; +#if !defined UPDATE_SERVER_NAME && !defined STANDALONE #define UPDATE_SERVER_NAME "update.quake3arena.com" +#endif // override on command line, config files etc. #ifndef MASTER_SERVER_NAME #define MASTER_SERVER_NAME "master.quake3arena.com"