]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Host_Shutdown now calls CL_Disconnect and Host_ShutdownServer so that quitting withou...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 19 Oct 2004 09:44:14 +0000 (09:44 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 19 Oct 2004 09:44:14 +0000 (09:44 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4669 d7cf8633-e32d-0410-b094-e92efae38249

host.c
host_cmd.c
sys_shared.c

diff --git a/host.c b/host.c
index 9cfe4bde3330fbc51f9b75af5956fe1d55941291..a6c17364cb29166c29e415f2204503f20b5961b0 100644 (file)
--- a/host.c
+++ b/host.c
@@ -937,6 +937,12 @@ void Host_Shutdown(void)
        }
        isdown = true;
 
+       // disconnect client from server if active
+       CL_Disconnect();
+
+       // shut down local server if active
+       Host_ShutdownServer (false);
+
        // Shutdown menu
        if(MR_Shutdown)
                MR_Shutdown();
index f45abdc6ad607b63cf590ad830604dde79db2484..d6aa856d6949bd6c7c58d2e58b45fc9366ee56ee 100644 (file)
@@ -32,13 +32,8 @@ Host_Quit_f
 ==================
 */
 
-extern qboolean host_shuttingdown;
 void Host_Quit_f (void)
 {
-       host_shuttingdown = true;
-       CL_Disconnect ();
-       Host_ShutdownServer(false);
-
        Sys_Quit ();
 }
 
index 07fc4b61b99c07fac1728af40f648a86606a30dd..134b35dcff1f59ae15e12ba1528337c48b01e813 100644 (file)
@@ -93,8 +93,10 @@ void Sys_Printf(const char *fmt, ...)
        Sys_Print(msg);
 }
 
+extern qboolean host_shuttingdown;
 void Sys_Quit (void)
 {
+       host_shuttingdown = true;
        Host_Shutdown();
        exit(0);
 }