From 51b444f813d75da83aa1e607a17b9e243d79d210 Mon Sep 17 00:00:00 2001 From: havoc Date: Tue, 19 Oct 2004 09:44:14 +0000 Subject: [PATCH] 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 --- host.c | 6 ++++++ host_cmd.c | 5 ----- sys_shared.c | 2 ++ 3 files changed, 8 insertions(+), 5 deletions(-) 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); } -- 2.39.2