[quake3-commits] r2386 - trunk/code/client
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Dec 15 18:33:03 EST 2012
Author: ztm
Date: 2012-12-15 18:33:02 -0500 (Sat, 15 Dec 2012)
New Revision: 2386
Modified:
trunk/code/client/cl_main.c
Log:
Fix reconnect command to work after leaving server. (#5794)
Modified: trunk/code/client/cl_main.c
===================================================================
--- trunk/code/client/cl_main.c 2012-12-15 21:55:07 UTC (rev 2385)
+++ trunk/code/client/cl_main.c 2012-12-15 23:33:02 UTC (rev 2386)
@@ -127,6 +127,7 @@
clientStatic_t cls;
vm_t *cgvm;
+char cl_reconnectServername[MAX_OSPATH];
char cl_oldGame[MAX_QPATH];
qboolean cl_oldGameSet;
@@ -1688,12 +1689,14 @@
================
*/
void CL_Reconnect_f( void ) {
- if ( !strlen( clc.servername ) || !strcmp( clc.servername, "localhost" ) ) {
+ if ( !strlen( cl_reconnectServername ) )
+ 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", clc.servername ) );
+ Cbuf_AddText( va("connect %s\n", cl_reconnectServername ) );
}
/*
@@ -1749,6 +1752,7 @@
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");
More information about the quake3-commits
mailing list