From c7c9f415db4f3de8750531269fde0be7a717cb7d Mon Sep 17 00:00:00 2001 From: SixFive7 <6650122+SixFive7@users.noreply.github.com> Date: Fri, 20 Nov 2026 01:05:08 +0000 Subject: [PATCH 1/2] Name a workshop addon when changing level to a community map A CHANGELEVEL signon with more than one addon is cut down to its first entry (f5b3ade). For a community map that entry is the map's own addon under game/csgo_community_addons, which clients ship with the game, so they change level in place with that addon alone: every extra addon is unmounted, and the client never reconnects through ReplyConnection to get the full list. With mm_cache_clients_with_addons the extras are not re-sent either, so they stay missing for the whole map. In that case, name the next addon instead. The client reconnects for it as it does for a workshop map, and ReplyConnection sends the full list. Workshop maps, Valve's built-in maps and single-addon lists are unchanged. --- src/multiaddonmanager.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/multiaddonmanager.cpp b/src/multiaddonmanager.cpp index ac603ab..e963970 100644 --- a/src/multiaddonmanager.cpp +++ b/src/multiaddonmanager.cpp @@ -977,9 +977,18 @@ KHook::Return MultiAddonManager::Hook_SendNetMessage(CServerSideClientBase if (addonsList.size() > 1) { // If there's more than one addon, ensure that it takes the first addon (which should be the workshop map or the first custom addon) - pMsg->set_addons(addonsList.front().c_str()); + AddonId addon = addonsList.front(); + + // Except for community maps: their addon is under game/csgo_community_addons (OFFICIAL_ADDONS) and ships with the game, + // so a message naming only that addon makes the client change level in place with it alone, unmounting every other addon, + // and it never reconnects through ReplyConnection to get the rest. Name the next addon instead: the client then reconnects + // for it as it does for a workshop map, and ReplyConnection sends the full list. + if (g_pFullFileSystem->IsDirectory(addon.c_str(), "OFFICIAL_ADDONS")) + addon = addonsList[1]; + + pMsg->set_addons(addon.c_str()); // Since the client will download the addon contained inside this messsage, we might as well add it to the list of client's downloaded addons. - clientInfo.currentPendingAddon = addonsList.front(); + clientInfo.currentPendingAddon = addon; } else if (addonsList.size() == 1) { From 74357cd0cd4c2ad0b2f5fd843fd53f0e47963939 Mon Sep 17 00:00:00 2001 From: SixFive7 <6650122+SixFive7@users.noreply.github.com> Date: Fri, 20 Nov 2026 03:48:03 +0000 Subject: [PATCH 2/2] Only name the next addon when the client is recorded as having it The previous commit names the next addon whenever a community map leads the CHANGELEVEL list. With mm_cache_clients_with_addons 0 the client's downloaded list is cleared on every map, so ReplyConnection then sends the community map alone first and the extra addon follows on a second reconnect: one more than before, where the in-place change already recovers with one. Do it only when the client is recorded as having the next addon, which is exactly when the downloaded-list check in Hook_SendNetMessage would keep it from being sent again. Otherwise the in-place change and the usual follow-up send stay as they were. --- src/multiaddonmanager.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/multiaddonmanager.cpp b/src/multiaddonmanager.cpp index e963970..1413945 100644 --- a/src/multiaddonmanager.cpp +++ b/src/multiaddonmanager.cpp @@ -981,9 +981,11 @@ KHook::Return MultiAddonManager::Hook_SendNetMessage(CServerSideClientBase // Except for community maps: their addon is under game/csgo_community_addons (OFFICIAL_ADDONS) and ships with the game, // so a message naming only that addon makes the client change level in place with it alone, unmounting every other addon, - // and it never reconnects through ReplyConnection to get the rest. Name the next addon instead: the client then reconnects - // for it as it does for a workshop map, and ReplyConnection sends the full list. - if (g_pFullFileSystem->IsDirectory(addon.c_str(), "OFFICIAL_ADDONS")) + // and it never reconnects through ReplyConnection to get the rest. Addons the client is recorded as having are not sent + // again after that (see below), so if that is the case for the next addon, name it instead: the client then reconnects + // for it as it does for a workshop map, and ReplyConnection sends the full list. Otherwise the missing addons follow the + // in-place change as usual. + if (g_pFullFileSystem->IsDirectory(addon.c_str(), "OFFICIAL_ADDONS") && Contains(clientInfo.downloadedAddons, addonsList[1])) addon = addonsList[1]; pMsg->set_addons(addon.c_str());