engine: server: execute maps/<mapname>_unload.cfg on server deactivation.

This commit is contained in:
Andrey Akhmichin 2024-02-16 08:33:35 +05:00 committed by Alibek Omarov
parent 4ea6eba8f2
commit 8b79e49a0f

View File

@ -690,6 +690,9 @@ void SV_DeactivateServer( void )
if( COM_CheckString( cycle )) if( COM_CheckString( cycle ))
Cbuf_AddTextf( "exec %s\n", cycle ); Cbuf_AddTextf( "exec %s\n", cycle );
if( COM_CheckStringEmpty( sv.name ))
Cbuf_AddTextf( "exec maps/%s_unload.cfg\n", sv.name );
if( !svs.initialized || sv.state == ss_dead ) if( !svs.initialized || sv.state == ss_dead )
return; return;