Browse Source

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

pull/2/head
Alibek Omarov 9 months 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. @@ -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 ) @@ -1308,6 +1309,7 @@ void EXPORT Host_Shutdown( void )
#endif
SV_Shutdown( "Server shutdown\n" );
SV_UnloadProgs();
SV_ShutdownFilter();
CL_Shutdown();

3
engine/server/sv_game.c

@ -5148,7 +5148,8 @@ qboolean SV_LoadProgs( const char *name ) @@ -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;

4
engine/server/sv_main.c

@ -1090,8 +1090,6 @@ void SV_Shutdown( const char *finalmsg ) @@ -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 ) @@ -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

Loading…
Cancel
Save