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( !clgame.hInstance ) return;
if( GI->internal_vgui_support )
VGui_Shutdown();
CL_FreeEdicts(); CL_FreeEdicts();
CL_FreeTempEnts(); CL_FreeTempEnts();
CL_FreeViewBeams(); CL_FreeViewBeams();

View File

@ -3138,6 +3138,8 @@ void CL_Shutdown( void )
CL_UnloadProgs (); CL_UnloadProgs ();
cls.initialized = false; cls.initialized = false;
// for client-side VGUI support we use other order
if( !GI->internal_vgui_support )
VGui_Shutdown(); VGui_Shutdown();
FS_Delete( "demoheader.tmp" ); // remove tmp file FS_Delete( "demoheader.tmp" ); // remove tmp file