Make forced unloading work in more cases than just server disconnects

This commit is contained in:
Thilo Schulz 2008-04-29 22:49:37 +00:00
parent 2f71e61b1d
commit 82e32bdf41

View file

@ -289,7 +289,9 @@ void QDECL Com_Error( int code, const char *fmt, ... ) {
Com_Printf ("********************\nERROR: %s\n********************\n", com_errorMessage); Com_Printf ("********************\nERROR: %s\n********************\n", com_errorMessage);
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();
FS_PureServerSetLoadedPaks("", ""); FS_PureServerSetLoadedPaks("", "");
com_errorEntered = qfalse; com_errorEntered = qfalse;
longjmp (abortframe, -1); longjmp (abortframe, -1);
@ -297,7 +299,9 @@ void QDECL Com_Error( int code, const char *fmt, ... ) {
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();
com_errorEntered = qfalse; com_errorEntered = qfalse;
CL_CDDialog(); CL_CDDialog();
} else { } else {