diff options
-rw-r--r-- | source/cl_draw.c | 4 | ||||
-rw-r--r-- | source/cl_input.c | 5 | ||||
-rw-r--r-- | source/net_sock.h | 2 | ||||
-rw-r--r-- | source/sv_main.c | 14 |
4 files changed, 20 insertions, 5 deletions
diff --git a/source/cl_draw.c b/source/cl_draw.c index 008a19e..13236e7 100644 --- a/source/cl_draw.c +++ b/source/cl_draw.c @@ -527,8 +527,10 @@ void SCR_DrawLoading( void ) { // draw message string if( cls.state < ca_connected && cls.messageString[0] ) { + x = scr_glconfig.vidWidth / 2; R_SetColor( DRAW_COLOR_RGB, colorRed ); - SCR_DrawString( x, y + 16, UI_CENTER|UI_MULTILINE, cls.messageString ); + SCR_DrawStringMulti( x, y + 16, UI_CENTER, + MAX_STRING_CHARS, cls.messageString, scr_font ); R_SetColor( DRAW_COLOR_CLEAR, NULL ); } } diff --git a/source/cl_input.c b/source/cl_input.c index b958719..e131781 100644 --- a/source/cl_input.c +++ b/source/cl_input.c @@ -98,7 +98,10 @@ void IN_Activate( void ) { grab = IN_GRAB; } else if( cls.key_dest & KEY_MENU ) { grab = IN_SHOW; - } else if( ( cls.key_dest & KEY_CONSOLE ) || sv_paused->integer || cls.demo.playback || cl.frame.ps.pmove.pm_type == PM_FREEZE ) { + } else if( ( cls.key_dest & KEY_CONSOLE ) || sv_paused->integer || + cls.demo.playback || cl.frame.ps.pmove.pm_type == PM_FREEZE || + cls.state < ca_connected ) + { grab = IN_HIDE; if( !input.hideCursor ) { input.hideCursor = 1; diff --git a/source/net_sock.h b/source/net_sock.h index e959a81..aabe918 100644 --- a/source/net_sock.h +++ b/source/net_sock.h @@ -138,7 +138,7 @@ char * NET_AdrToString( const netadr_t *a ); qboolean NET_StringToAdr( const char *s, netadr_t *a, int port ); void NET_Sleep( int msec ); -#if USE_CLIENT +#if USE_CLIENT && USE_SERVER #define NET_IsLocalAddress( adr ) ( (adr)->type == NA_LOOPBACK ) #else #define NET_IsLocalAddress( adr ) 0 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 ); |