engine: server: disable SV_UnloadProgs, only call it when shutting down engine

This commit is contained in:
Alibek Omarov 2023-09-23 04:09:18 +03:00
parent d8b261370a
commit 8fb908e3d4
3 changed files with 5 additions and 4 deletions

View File

@ -33,6 +33,7 @@ GNU General Public License for more details.
#include "common.h"
#include "base_cmd.h"
#include "client.h"
#include "server.h"
#include "netchan.h"
#include "protocol.h"
#include "mod_local.h"
@ -1308,6 +1309,7 @@ void EXPORT Host_Shutdown( void )
#endif
SV_Shutdown( "Server shutdown\n" );
SV_UnloadProgs();
SV_ShutdownFilter();
CL_Shutdown();

View File

@ -5148,7 +5148,8 @@ qboolean SV_LoadProgs( const char *name )
static playermove_t gpMove;
edict_t *e;
if( svgame.hInstance ) SV_UnloadProgs();
if( svgame.hInstance )
return true;
// fill it in
svgame.pmove = &gpMove;

View File

@ -1090,8 +1090,6 @@ void SV_Shutdown( const char *finalmsg )
// drop the client if want to load a new map
if( CL_IsPlaybackDemo( ))
CL_Drop();
SV_UnloadProgs ();
return;
}
@ -1108,7 +1106,7 @@ void SV_Shutdown( const char *finalmsg )
NET_MasterShutdown();
NET_Config( false, false );
SV_UnloadProgs ();
SV_DeactivateServer();
CL_Drop();
// free current level