From 82e32bdf413b44fe8f7a6655891186b457c49401 Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Tue, 29 Apr 2008 22:49:37 +0000 Subject: [PATCH] Make forced unloading work in more cases than just server disconnects --- code/qcommon/common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/qcommon/common.c b/code/qcommon/common.c index d7b6cb24..7e695dbf 100644 --- a/code/qcommon/common.c +++ b/code/qcommon/common.c @@ -289,7 +289,9 @@ void QDECL Com_Error( int code, const char *fmt, ... ) { Com_Printf ("********************\nERROR: %s\n********************\n", com_errorMessage); SV_Shutdown (va("Server crashed: %s", com_errorMessage)); CL_Disconnect( qtrue ); + VM_Forced_Unload_Start(); CL_FlushMemory( ); + VM_Forced_Unload_Done(); FS_PureServerSetLoadedPaks("", ""); com_errorEntered = qfalse; longjmp (abortframe, -1); @@ -297,7 +299,9 @@ void QDECL Com_Error( int code, const char *fmt, ... ) { SV_Shutdown( "Server didn't have CD" ); if ( com_cl_running && com_cl_running->integer ) { CL_Disconnect( qtrue ); + VM_Forced_Unload_Start(); CL_FlushMemory( ); + VM_Forced_Unload_Done(); com_errorEntered = qfalse; CL_CDDialog(); } else {