From ce41605441c55110aa523250987b50235261a6f6 Mon Sep 17 00:00:00 2001 From: thilo Date: Thu, 10 Apr 2008 15:37:25 +0000 Subject: Add com_standalone cvar for at-runtime handling of mods that do not require the original quake3 game data. git-svn-id: svn://svn.icculus.org/quake3/trunk@1309 edf5b092-35ff-0310-97b2-ce42778d08ea --- code/server/sv_ccmds.c | 7 +++++-- code/server/sv_client.c | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'code/server') diff --git a/code/server/sv_ccmds.c b/code/server/sv_ccmds.c index 18dcfbc..e2bcd93 100644 --- a/code/server/sv_ccmds.c +++ b/code/server/sv_ccmds.c @@ -740,8 +740,11 @@ void SV_AddOperatorCommands( void ) { Cmd_AddCommand ("heartbeat", SV_Heartbeat_f); Cmd_AddCommand ("kick", SV_Kick_f); #ifndef STANDALONE - Cmd_AddCommand ("banUser", SV_Ban_f); - Cmd_AddCommand ("banClient", SV_BanNum_f); + if(!Cvar_VariableIntegerValue("com_standalone")) + { + Cmd_AddCommand ("banUser", SV_Ban_f); + Cmd_AddCommand ("banClient", SV_BanNum_f); + } #endif Cmd_AddCommand ("clientkick", SV_KickNum_f); Cmd_AddCommand ("status", SV_Status_f); diff --git a/code/server/sv_client.c b/code/server/sv_client.c index 5345b0e..8230036 100644 --- a/code/server/sv_client.c +++ b/code/server/sv_client.c @@ -82,8 +82,11 @@ void SV_GetChallenge( netadr_t from ) { } #ifdef STANDALONE - challenge->pingTime = svs.time; - NET_OutOfBandPrint( NS_SERVER, from, "challengeResponse %i", challenge->challenge ); + if(Cvar_VariableIntegerValue("com_standalone")) + { + challenge->pingTime = svs.time; + NET_OutOfBandPrint( NS_SERVER, from, "challengeResponse %i", challenge->challenge ); + } #else // if they are on a lan address, send the challengeResponse immediately if ( Sys_IsLANAddress( from ) ) { -- cgit v1.2.3