Con_Printf(CON_ERROR "Host_Error: %s\n", hosterrorstring1);
// LadyHavoc: if crashing very early, or currently shutting down, do
- // Sys_Abort instead
+ // Sys_Error instead
if (host.framecount < 3 || host.state == host_shutdown)
- Sys_Abort ("Host_Error during %s: %s", host.framecount < 3 ? "startup" : "shutdown", hosterrorstring1);
+ Sys_Error ("Host_Error during %s: %s", host.framecount < 3 ? "startup" : "shutdown", hosterrorstring1);
if (hosterror)
- Sys_Abort ("Host_Error: recursively entered (original error was: %s new error is: %s)", hosterrorstring2, hosterrorstring1);
+ Sys_Error ("Host_Error: recursively entered (original error was: %s new error is: %s)", hosterrorstring2, hosterrorstring1);
hosterror = true;
dp_strlcpy(hosterrorstring2, hosterrorstring1, sizeof(hosterrorstring2));
CL_Parse_DumpPacket();
-
CL_Parse_ErrorCleanUp();
- //PR_Crash();
-
// print out where the crash happened, if it was caused by QC (and do a cleanup)
- PRVM_Crash(SVVM_prog);
- PRVM_Crash(CLVM_prog);
-#ifdef CONFIG_MENU
- PRVM_Crash(MVM_prog);
-#endif
-
- Cvar_SetValueQuick(&csqc_progcrc, -1);
- Cvar_SetValueQuick(&csqc_progsize, -1);
+ PRVM_Crash();
if(host.hook.SV_Shutdown)
host.hook.SV_Shutdown();
if (cls.state == ca_dedicated)
- Sys_Abort ("Host_Error: %s",hosterrorstring2); // dedicated servers exit
+ Sys_Error("Host_Error: %s", hosterrorstring1); // dedicated servers exit
// prevent an endless loop if the error was triggered by a command
Cbuf_Clear(cmd_local->cbuf);
- // DP8 TODO: send a disconnect message indicating we errored out, see Sys_Abort() and Sys_HandleCrash()
- CL_Disconnect();
- cls.demonum = -1;
+ CL_DisconnectEx(false, "Host_Error: %s", hosterrorstring1);
+ cls.demonum = -1; // stop demo loop
hosterror = false;
}
else
{
- Sys_Abort("session lock %s could not be acquired. Please run with -sessionid and an unique session name.\n", p);
+ Sys_Error("session lock %s could not be acquired. Please run with -sessionid and an unique session name.\n", p);
}
}
}
host.state = host_init;
if (setjmp(host.abortframe)) // Huh?!
- Sys_Abort("Engine initialization failed. Check the console (if available) for additional information.\n");
+ Sys_Error("Engine initialization failed. Check the console (if available) for additional information.\n");
if (Sys_CheckParm("-profilegameonly"))
Sys_AllowProfiling(false);
oldtime = Sys_DirtyTime();
// Main event loop
- while(host.state != host_shutdown)
+ while(host.state < host_shutdown) // see Sys_HandleCrash() comments
{
// Something bad happened, or the server disconnected
if (setjmp(host.abortframe))