]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
host: Make Host_Quit_f static. Avoid calling it directly.
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 29 Sep 2020 00:33:13 +0000 (00:33 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 29 Sep 2020 00:33:13 +0000 (00:33 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12957 d7cf8633-e32d-0410-b094-e92efae38249

cl_demo.c
host.c
menu.c
quakedef.h

index 7c7874329c5bc0996dc964e0544f6232e8e42eb3..186174e9b506d4dc93b4bf260c5b98d9fc6b6d20 100644 (file)
--- a/cl_demo.c
+++ b/cl_demo.c
@@ -98,7 +98,7 @@ void CL_StopPlayback (void)
 
        if (!cls.demostarting) // only quit if not starting another demo
                if (Sys_CheckParm("-demo") || Sys_CheckParm("-capturedemo"))
-                       Host_Quit_f(&cmd_client);
+                       host.state = host_shutdown;
 
 }
 
@@ -579,11 +579,11 @@ static void CL_FinishTimeDemo (void)
                                }
                                Z_Free(history);
                                history = NULL;
-                               Host_Quit_f(&cmd_client);
+                               host.state = host_shutdown;
                        }
                }
                else
-                       Host_Quit_f(&cmd_client);
+                       host.state = host_shutdown;
        }
 }
 
diff --git a/host.c b/host.c
index 4b192c5261f718bbb4b4475033ec979eaa7c9dd1..b71eefa877e197c960946987250be9db56a9923b 100644 (file)
--- a/host.c
+++ b/host.c
@@ -205,7 +205,7 @@ static void Host_ServerOptions (void)
 Host_Quit_f
 ==================
 */
-void Host_Quit_f(cmd_state_t *cmd)
+static void Host_Quit_f(cmd_state_t *cmd)
 {
        if(host.state == host_shutdown)
                Con_Printf("shutting down already!\n");
diff --git a/menu.c b/menu.c
index 1a55029859bf428cf6870a8519adb8b282c900fd..8dd7693440103fa8333cea295a4d1fb8a5b3633b 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -3287,7 +3287,7 @@ static void M_Quit_Key(cmd_state_t *cmd, int key, int ascii)
 
        case 'Y':
        case 'y':
-               Host_Quit_f(cmd);
+               host.state = host_shutdown;
                break;
 
        default:
index 4acbd64bf35f909fefb29d955a9f287b53c6fcaa..dfe40570aa736fe3c8c72ce5f11f56892b634ddd 100644 (file)
@@ -567,7 +567,6 @@ double Host_Frame(double time);
 void Host_Shutdown(void);
 void Host_StartVideo(void);
 void Host_Error(const char *error, ...) DP_FUNC_PRINTF(1) DP_FUNC_NORETURN;
-void Host_Quit_f(cmd_state_t *cmd);
 void Host_NoOperation_f(cmd_state_t *cmd);
 void Host_LockSession(void);
 void Host_UnlockSession(void);