]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
deduplicate Sys_Error()
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index 3e2c5f99075ab8e15934295b65bf84bde41d5c90..8ba2f272b3dd72eb41eeb3a06ba4ec3f3fcf5f2a 100644 (file)
--- a/host.c
+++ b/host.c
@@ -133,6 +133,9 @@ void Host_Error (const char *error, ...)
        if (cls.state == ca_dedicated)
                Sys_Error ("Host_Error: %s",hosterrorstring2);  // dedicated servers exit
 
+       // prevent an endless loop if the error was triggered by a command
+       Cbuf_Clear(cmd_local->cbuf);
+
        CL_Disconnect();
        cls.demonum = -1;
 
@@ -367,6 +370,10 @@ static void Host_Init (void)
        int i;
        char vabuf[1024];
 
+       Sys_SDL_Init();
+
+       Memory_Init();
+
        host.hook.ConnectLocal = NULL;
        host.hook.Disconnect = NULL;
        host.hook.ToggleMenu = NULL;