]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
Remove redundant ampersand breaking ContainerOf and List_For_Each_Entry. Make all...
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index fa3c4911894d04441ef096a3a94bc59a5d31ab11..efcba3e2f156f479c3a113cfd86035b68a2457bf 100644 (file)
--- a/host.c
+++ b/host.c
@@ -1,5 +1,6 @@
 /*
 Copyright (C) 1996-1997 Id Software, Inc.
+Copyright (C) 2000-2021 DarkPlaces contributors
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
@@ -127,9 +128,8 @@ void Host_Error (const char *error, ...)
        Cvar_SetValueQuick(&csqc_progcrc, -1);
        Cvar_SetValueQuick(&csqc_progsize, -1);
 
-       SV_LockThreadMutex();
-       SV_Shutdown ();
-       SV_UnlockThreadMutex();
+       if(host.hook.SV_Shutdown)
+               host.hook.SV_Shutdown();
 
        if (cls.state == ca_dedicated)
                Sys_Error ("Host_Error: %s",hosterrorstring2);  // dedicated servers exit
@@ -374,7 +374,7 @@ static void Host_Init (void)
        host.hook.Disconnect = NULL;
        host.hook.ToggleMenu = NULL;
        host.hook.CL_Intermission = NULL;
-       host.hook.SV_CanSave = NULL;
+       host.hook.SV_Shutdown = NULL;
 
        host.state = host_init;
 
@@ -587,9 +587,8 @@ void Host_Shutdown(void)
                SV_StopThread();
 
        // shut down local server if active
-       SV_LockThreadMutex();
-       SV_Shutdown ();
-       SV_UnlockThreadMutex();
+       if(host.hook.SV_Shutdown)
+               host.hook.SV_Shutdown();
 
        // AK shutdown PRVM
        // AK hmm, no PRVM_Shutdown(); yet