Browse Source

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

pull/2/head
Alibek Omarov 1 year ago
parent
commit
8fb908e3d4
  1. 2
      engine/common/host.c
  2. 3
      engine/server/sv_game.c
  3. 4
      engine/server/sv_main.c

2
engine/common/host.c

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

3
engine/server/sv_game.c

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

4
engine/server/sv_main.c

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

Loading…
Cancel
Save