From 7376f12dfcdfb20b0d4a3046b246a263cd6a2bf7 Mon Sep 17 00:00:00 2001 From: Richard Allen Date: Sat, 22 Dec 2012 00:48:04 +0000 Subject: [PATCH] IOQ3 commit 2389 --- reaction/code/client/cl_main.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/reaction/code/client/cl_main.c b/reaction/code/client/cl_main.c index ac3354a5..494eb587 100644 --- a/reaction/code/client/cl_main.c +++ b/reaction/code/client/cl_main.c @@ -127,7 +127,7 @@ clientConnection_t clc; clientStatic_t cls; vm_t *cgvm; -char cl_reconnectServername[MAX_OSPATH]; +char cl_reconnectArgs[MAX_OSPATH]; char cl_oldGame[MAX_QPATH]; qboolean cl_oldGameSet; @@ -1689,14 +1689,10 @@ CL_Reconnect_f ================ */ void CL_Reconnect_f( void ) { - if ( !strlen( cl_reconnectServername ) ) + if ( !strlen( cl_reconnectArgs ) ) return; - if ( !strcmp( cl_reconnectServername, "localhost" ) ) { - Com_Printf( "Can't reconnect to localhost.\n" ); - return; - } Cvar_Set("ui_singlePlayerActive", "0"); - Cbuf_AddText( va("connect %s\n", cl_reconnectServername ) ); + Cbuf_AddText( va("connect %s\n", cl_reconnectArgs ) ); } /* @@ -1730,6 +1726,9 @@ void CL_Connect_f( void ) { server = Cmd_Argv(2); } + // save arguments for reconnect + Q_strncpyz( cl_reconnectArgs, Cmd_Args(), sizeof( cl_reconnectArgs ) ); + Cvar_Set("ui_singlePlayerActive", "0"); // fire a message off to the motd server @@ -1752,7 +1751,6 @@ void CL_Connect_f( void ) { Con_Close(); Q_strncpyz( clc.servername, server, sizeof(clc.servername) ); - Q_strncpyz( cl_reconnectServername, server, sizeof( cl_reconnectServername ) ); if (!NET_StringToAdr(clc.servername, &clc.serverAddress, family) ) { Com_Printf ("Bad server address\n");