Skip to content

Commit 4cafbc2

Browse files
committed
Treat community maps as workshop maps
1 parent 86a4237 commit 4cafbc2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/multiaddonmanager.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,13 @@ void FASTCALL Hook_SetPendingHostStateRequest(CHostStateMgr* pMgrDoNotUse, CHost
970970
g_MultiAddonManager.ClearCurrentWorkshopMap();
971971
}
972972

973+
// Valve changed the way community maps (like de_dogtown) are loaded
974+
// Now their content lives in addons and they're mounted internally somehow (m_Addons is already set to it by this point)
975+
// So check if the addon is indeed one of the community maps and keep it, otherwise clients would error out due to missing assets
976+
// Each map has its own folder under game/csgo_community_addons which is mounted as "OFFICIAL_ADDONS"
977+
if (!pRequest->m_Addons.IsEmpty() && g_pFullFileSystem->IsDirectory(pRequest->m_Addons.String(), "OFFICIAL_ADDONS"))
978+
g_MultiAddonManager.SetCurrentWorkshopMap(pRequest->m_Addons);
979+
973980
if (g_MultiAddonManager.m_ExtraAddons.Count() == 0)
974981
return g_pfnSetPendingHostStateRequest(pMgrDoNotUse, pRequest);
975982

0 commit comments

Comments
 (0)