]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - netconn.c
protocol/dp8: Implement parting messages
[xonotic/darkplaces.git] / netconn.c
index 1ec19fcdb7d5cc372117b67c83c1673888a6c6ac..ac481ca6df030e6d3d602ce11f0885880ab81b72 100755 (executable)
--- a/netconn.c
+++ b/netconn.c
@@ -1529,7 +1529,7 @@ static void NetConn_ConnectionEstablished(lhnetsocket_t *mysocket, lhnetaddress_
 #endif
        // Disconnect from the current server or stop demo playback
        if(cls.state == ca_connected || cls.demoplayback)
-               CL_Disconnect();
+               CL_Disconnect(false, NULL);
        // allocate a net connection to keep track of things
        cls.netcon = NetConn_Open(mysocket, peeraddress);
        crypto = &cls.netcon->crypto;
@@ -2488,10 +2488,7 @@ void NetConn_ClientFrame(void)
        NetConn_QueryQueueFrame();
 #endif
        if (cls.netcon && host.realtime > cls.netcon->timeout && !sv.active)
-       {
-               Con_Print("Connection timed out\n");
-               CL_Disconnect();
-       }
+               CL_Disconnect(true, "Connection timed out");
 }
 
 static void NetConn_BuildChallengeString(char *buffer, int bufferlength)