mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 23:02:01 +00:00
Server crash can cause recursive call to Com_Error, too
This commit is contained in:
parent
4982bf8e6b
commit
16c83ae2c5
1 changed files with 7 additions and 3 deletions
|
@ -287,9 +287,9 @@ void QDECL Com_Error( int code, const char *fmt, ... ) {
|
||||||
Cvar_Set("com_errorMessage", com_errorMessage);
|
Cvar_Set("com_errorMessage", com_errorMessage);
|
||||||
|
|
||||||
if (code == ERR_DISCONNECT || code == ERR_SERVERDISCONNECT) {
|
if (code == ERR_DISCONNECT || code == ERR_SERVERDISCONNECT) {
|
||||||
|
VM_Forced_Unload_Start();
|
||||||
SV_Shutdown( "Server disconnected" );
|
SV_Shutdown( "Server disconnected" );
|
||||||
CL_Disconnect( qtrue );
|
CL_Disconnect( qtrue );
|
||||||
VM_Forced_Unload_Start();
|
|
||||||
CL_FlushMemory( );
|
CL_FlushMemory( );
|
||||||
VM_Forced_Unload_Done();
|
VM_Forced_Unload_Done();
|
||||||
// make sure we can get at our local stuff
|
// make sure we can get at our local stuff
|
||||||
|
@ -298,32 +298,36 @@ void QDECL Com_Error( int code, const char *fmt, ... ) {
|
||||||
longjmp (abortframe, -1);
|
longjmp (abortframe, -1);
|
||||||
} else if (code == ERR_DROP) {
|
} else if (code == ERR_DROP) {
|
||||||
Com_Printf ("********************\nERROR: %s\n********************\n", com_errorMessage);
|
Com_Printf ("********************\nERROR: %s\n********************\n", com_errorMessage);
|
||||||
|
VM_Forced_Unload_Start();
|
||||||
SV_Shutdown (va("Server crashed: %s", com_errorMessage));
|
SV_Shutdown (va("Server crashed: %s", com_errorMessage));
|
||||||
CL_Disconnect( qtrue );
|
CL_Disconnect( qtrue );
|
||||||
VM_Forced_Unload_Start();
|
|
||||||
CL_FlushMemory( );
|
CL_FlushMemory( );
|
||||||
VM_Forced_Unload_Done();
|
VM_Forced_Unload_Done();
|
||||||
FS_PureServerSetLoadedPaks("", "");
|
FS_PureServerSetLoadedPaks("", "");
|
||||||
com_errorEntered = qfalse;
|
com_errorEntered = qfalse;
|
||||||
longjmp (abortframe, -1);
|
longjmp (abortframe, -1);
|
||||||
} else if ( code == ERR_NEED_CD ) {
|
} else if ( code == ERR_NEED_CD ) {
|
||||||
|
VM_Forced_Unload_Start();
|
||||||
SV_Shutdown( "Server didn't have CD" );
|
SV_Shutdown( "Server didn't have CD" );
|
||||||
if ( com_cl_running && com_cl_running->integer ) {
|
if ( com_cl_running && com_cl_running->integer ) {
|
||||||
CL_Disconnect( qtrue );
|
CL_Disconnect( qtrue );
|
||||||
VM_Forced_Unload_Start();
|
|
||||||
CL_FlushMemory( );
|
CL_FlushMemory( );
|
||||||
VM_Forced_Unload_Done();
|
VM_Forced_Unload_Done();
|
||||||
CL_CDDialog();
|
CL_CDDialog();
|
||||||
} else {
|
} else {
|
||||||
Com_Printf("Server didn't have CD\n" );
|
Com_Printf("Server didn't have CD\n" );
|
||||||
|
VM_Forced_Unload_Done();
|
||||||
}
|
}
|
||||||
|
|
||||||
FS_PureServerSetLoadedPaks("", "");
|
FS_PureServerSetLoadedPaks("", "");
|
||||||
|
|
||||||
com_errorEntered = qfalse;
|
com_errorEntered = qfalse;
|
||||||
longjmp (abortframe, -1);
|
longjmp (abortframe, -1);
|
||||||
} else {
|
} else {
|
||||||
|
VM_Forced_Unload_Start();
|
||||||
CL_Shutdown (va("Client fatal crashed: %s", com_errorMessage));
|
CL_Shutdown (va("Client fatal crashed: %s", com_errorMessage));
|
||||||
SV_Shutdown (va("Server fatal crashed: %s", com_errorMessage));
|
SV_Shutdown (va("Server fatal crashed: %s", com_errorMessage));
|
||||||
|
VM_Forced_Unload_Done();
|
||||||
}
|
}
|
||||||
|
|
||||||
Com_Shutdown ();
|
Com_Shutdown ();
|
||||||
|
|
Loading…
Reference in a new issue