engine: client: fixed client VGUI API shutdown

This commit is contained in:
SNMetamorph 2022-11-14 20:39:01 +04:00 committed by Alibek Omarov
parent e9da43666c
commit ae94a6aeba
2 changed files with 6 additions and 1 deletions

View File

@ -3898,6 +3898,9 @@ void CL_UnloadProgs( void )
{
if( !clgame.hInstance ) return;
if( GI->internal_vgui_support )
VGui_Shutdown();
CL_FreeEdicts();
CL_FreeTempEnts();
CL_FreeViewBeams();

View File

@ -3138,7 +3138,9 @@ void CL_Shutdown( void )
CL_UnloadProgs ();
cls.initialized = false;
VGui_Shutdown();
// for client-side VGUI support we use other order
if( !GI->internal_vgui_support )
VGui_Shutdown();
FS_Delete( "demoheader.tmp" ); // remove tmp file
SCR_FreeCinematic (); // release AVI's *after* client.dll because custom renderer may use them