]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - netconn.c
cvar: Remove unused ignore_callback variable
[xonotic/darkplaces.git] / netconn.c
index 1d52b5ad78f8f5bf8151669a6a4b303d613740e4..af1aae28eab4c3b8e15297ed96206ef3473f894d 100755 (executable)
--- a/netconn.c
+++ b/netconn.c
@@ -1527,13 +1527,7 @@ static void NetConn_ConnectionEstablished(lhnetsocket_t *mysocket, lhnetaddress_
 #ifdef CONFIG_MENU
        M_Update_Return_Reason("");
 #endif
-       // if we're connecting to a remote server, shut down any local server
-       if (LHNETADDRESS_GetAddressType(peeraddress) != LHNETADDRESSTYPE_LOOP && sv.active)
-       {
-               SV_LockThreadMutex();
-               SV_Shutdown ();
-               SV_UnlockThreadMutex();
-       }
+       // Disconnect from the current server or stop demo playback
        if(cls.state == ca_connected || cls.demoplayback)
                CL_Disconnect();
        // allocate a net connection to keep track of things
@@ -2497,9 +2491,6 @@ void NetConn_ClientFrame(void)
        {
                Con_Print("Connection timed out\n");
                CL_Disconnect();
-               SV_LockThreadMutex();
-               SV_Shutdown ();
-               SV_UnlockThreadMutex();
        }
 }
 
@@ -2938,7 +2929,7 @@ static void RCon_Execute(lhnetsocket_t *mysocket, lhnetaddress_t *peeraddress, c
                        if(l)
                        {
                                client_t *host_client_save = host_client;
-                               Cmd_ExecuteString(cmd_server, s, src_local, true);
+                               Cmd_ExecuteString(cmd_local, s, src_local, true);
                                host_client = host_client_save;
                                // in case it is a command that changes host_client (like restart)
                        }