Playlists: fix resource/memory leak

Remove workaround that was implemented to counter a crash during the beginning of this project, this issue was long solved but the workaround was never removed. Clearing the last precached VPK name prevents the engine from helping other threads to properly unload existing handles, if at all.
This commit is contained in:
Kawe Mazidjatari 2024-01-21 20:24:44 +01:00
parent fe2a95e4ec
commit 4662995f2e
2 changed files with 1 additions and 3 deletions

View File

@ -70,7 +70,7 @@ void CServerListManager::LaunchServer(const bool bChangeLevel) const
m_Server.m_svHostName.c_str(), m_Server.m_svHostMap.c_str(), m_Server.m_svPlaylist.c_str());
/*
* Playlist gets parsed in two instances, first in KeyValues::ParsePlaylists with all the necessary
* Playlist gets parsed in two instances, first in Playlists_Parse() with all the necessary
* values. Then when you would normally call launchplaylist which calls StartPlaylist it would cmd
* call mp_gamemode which parses the gamemode specific part of the playlist..
*/

View File

@ -53,8 +53,6 @@ bool Playlists_Load(const char* pszPlaylist)
//-----------------------------------------------------------------------------
bool Playlists_Parse(const char* pszPlaylist)
{
g_szMTVFItemName[0] = '\0'; // Terminate g_szMTVFTaskName to prevent crash while loading playlist.
CHAR sPlaylistPath[] = "\x77\x27\x35\x2b\x2c\x6c\x2b\x2c\x2b";
PCHAR curr = sPlaylistPath;
while (*curr)