Skip to content

Commit

Permalink
engine: server: allow server unloading for Win32 targets until we fig…
Browse files Browse the repository at this point in the history
…ure out the issues with MetaMod
  • Loading branch information
a1batross committed Oct 28, 2023
1 parent fe407fb commit f07eea5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions engine/server/sv_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -5148,7 +5148,13 @@ qboolean SV_LoadProgs( const char *name )
edict_t *e;

if( svgame.hInstance )
{
#if XASH_WIN32
SV_UnloadProgs();
#else // XASH_WIN32
return true;
#endif // XASH_WIN32
}

// fill it in
svgame.pmove = &gpMove;
Expand Down
7 changes: 7 additions & 0 deletions engine/server/sv_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,10 @@ void SV_Shutdown( const char *finalmsg )
// drop the client if want to load a new map
if( CL_IsPlaybackDemo( ))
CL_Drop();

#if XASH_WIN32
SV_UnloadProgs();
#endif // XASH_WIN32
return;
}

Expand All @@ -1107,6 +1111,9 @@ void SV_Shutdown( const char *finalmsg )

NET_Config( false, false );
SV_DeactivateServer();
#if XASH_WIN32
SV_UnloadProgs();
#endif // XASH_WIN32
CL_Drop();

// free current level
Expand Down

0 comments on commit f07eea5

Please sign in to comment.