#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
{
Con_Print("Connection timed out\n");
CL_Disconnect();
- SV_LockThreadMutex();
- SV_Shutdown ();
- SV_UnlockThreadMutex();
}
}
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)
}