]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
now should be able to connect to another server without leaving the current server...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 6 Oct 2004 19:39:01 +0000 (19:39 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 6 Oct 2004 19:39:01 +0000 (19:39 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4602 d7cf8633-e32d-0410-b094-e92efae38249

netconn.c

index 0e31cba74fb86a1a934885f8314250848a8d73cd..3765ef280b60cb54ebdcb32fa520ef5c600e1244 100755 (executable)
--- 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)