diff options
author | Andrey Nazarov <skuller@skuller.net> | 2008-08-24 11:27:38 +0000 |
---|---|---|
committer | Andrey Nazarov <skuller@skuller.net> | 2008-08-24 11:27:38 +0000 |
commit | 0257c5df02687ff9a97c7ef87f464838d4df32aa (patch) | |
tree | 07d6229ef71523fd3a4afe68299bb32300f2d121 /source/sv_main.c | |
parent | 51e69282c910a0265fb4a46d54449a1317eef07f (diff) |
Added support for `sv_downloadserver' cvar.
Fixed server messages being misplaced on client connection screen.
Diffstat (limited to 'source/sv_main.c')
-rw-r--r-- | source/sv_main.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/source/sv_main.c b/source/sv_main.c index fc58040..ffc7512 100644 --- a/source/sv_main.c +++ b/source/sv_main.c @@ -65,6 +65,7 @@ cvar_t *sv_maxclients; cvar_t *sv_reserved_slots; cvar_t *sv_showclamp; cvar_t *sv_locked; +cvar_t *sv_downloadserver; cvar_t *sv_hostname; cvar_t *sv_public; // should heartbeats be sent @@ -515,6 +516,7 @@ static void SVC_DirectConnect( void ) { int maxlength; netchan_type_t nctype; char *ncstring, *acstring; + char dlstring[MAX_INFO_STRING]; int reserved; int zlib; @@ -889,9 +891,16 @@ static void SVC_DirectConnect( void ) { acstring = ""; } + if( sv_downloadserver->string[0] ) { + Com_sprintf( dlstring, sizeof( dlstring ), " dlserver=%s", + sv_downloadserver->string ); + } else { + dlstring[0] = 0; + } + // send the connect packet to the client - Netchan_OutOfBandPrint( NS_SERVER, &net_from, "client_connect%s%s map=%s", - ncstring, acstring, newcl->mapname ); + Netchan_OutOfBandPrint( NS_SERVER, &net_from, "client_connect%s%s%s map=%s", + ncstring, acstring, dlstring, newcl->mapname ); List_Init( &newcl->msg_free ); List_Init( &newcl->msg_used[0] ); @@ -1799,6 +1808,7 @@ void SV_Init( void ) { sv_reserved_password = Cvar_Get( "sv_reserved_password", "", CVAR_PRIVATE ); sv_locked = Cvar_Get( "sv_locked", "0", 0 ); sv_novis = Cvar_Get ("sv_novis", "0", 0); + sv_downloadserver = Cvar_Get( "sv_downloadserver", "", 0 ); sv_debug_send = Cvar_Get( "sv_debug_send", "0", 0 ); sv_pad_packets = Cvar_Get( "sv_pad_packets", "0", 0 ); |