From d7a9fa4ba28648cbc0ed44f89014849d98594801 Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 6 Oct 2004 19:39:01 +0000 Subject: [PATCH] now should be able to connect to another server without leaving the current server until the connection is accepted git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4602 d7cf8633-e32d-0410-b094-e92efae38249 --- netconn.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/netconn.c b/netconn.c index 0e31cba7..3765ef28 100755 --- a/netconn.c +++ b/netconn.c @@ -615,16 +615,18 @@ int NetConn_ReceivedMessage(netconn_t *conn, qbyte *data, int length) void NetConn_ConnectionEstablished(lhnetsocket_t *mysocket, lhnetaddress_t *peeraddress) { + cls.connect_trying = false; + // the connection request succeeded, stop current connection and set up a new connection + CL_Disconnect(); cls.netcon = NetConn_Open(mysocket, peeraddress); Con_Printf("Connection accepted to %s\n", cls.netcon->address); key_dest = key_game; m_state = m_none; - cls.connect_trying = false; cls.demonum = -1; // not in the demo loop now cls.state = ca_connected; cls.signon = 0; // need all the signon messages before playing CL_ClearState(); - Host_Reconnect_f(); + SCR_BeginLoadingPlaque(); } int NetConn_IsLocalGame(void) -- 2.39.2