From: havoc Date: Tue, 19 Oct 2004 09:44:14 +0000 (+0000) Subject: Host_Shutdown now calls CL_Disconnect and Host_ShutdownServer so that quitting withou... X-Git-Tag: xonotic-v0.1.0preview~5455 X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;h=51b444f813d75da83aa1e607a17b9e243d79d210;p=xonotic%2Fdarkplaces.git Host_Shutdown now calls CL_Disconnect and Host_ShutdownServer so that quitting without using the quit command no longer leaves a player connected to the server git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4669 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/host.c b/host.c index 9cfe4bde..a6c17364 100644 --- 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(); diff --git a/host_cmd.c b/host_cmd.c index f45abdc6..d6aa856d 100644 --- a/host_cmd.c +++ b/host_cmd.c @@ -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 (); } diff --git a/sys_shared.c b/sys_shared.c index 07fc4b61..134b35dc 100644 --- a/sys_shared.c +++ b/sys_shared.c @@ -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); }