Repository navigation
Conversation
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #88.
What changes
One condition in
Hook_SendNetMessage. ASIGNONSTATE_CHANGELEVELmessage that lists more than one addon is still cut down to one entry (f5b3ade). Two things must hold for the change to apply:OFFICIAL_ADDONS, the checkReloadMapandHook_SetPendingHostStateRequestalready use);downloadedAddons).Then the message names that next addon instead, and it becomes the client's pending addon. Nothing else changes.
Why it works
A community map's addon ships with the game. A message naming only that addon makes the client change level in place with it alone: it unmounts every extra addon and never goes through
ReplyConnection. After that,Hook_SendNetMessagesends whatever is still missing, except the addons listed indownloadedAddons. So withmm_cache_clients_with_addons 1, the extras are never sent again for the rest of the map (#88).A message naming a workshop addon makes the client take the path it takes for a workshop map:
Downloading Addons (<addon>)(instant, since it already has the item), a full reconnect, andHook_ReplyConnectionsends the full list.ReplyConnectionitself needs no change. The client is recorded as having<addon>, so it stays in the list, and the community map becomes the pending addon if it is not recorded yet.The second condition limits the change to the case that is actually broken. An addon the client is not recorded as having, which with
mm_cache_clients_with_addons 0is every addon, is still sent after the in-place change, as in v1.7.4.Tests
Run on 2026-11-20 on a Linux dedicated server (CS2 1.42.0.0, SteamRT4 build of this branch at 74357cd) with one workshop addon in
mm_extra_addonsand a Windows client, withmm_cache_clients_with_addons 1unless noted.Before (v1.7.4, 033de6c):
changelevel de_eldoradochanges level in place. The client logsSwitchToLoop levelload requested: id [7] addons [de_eldorado]andUnmounting addon '<addon>', nothing follows, and<addon>stays missing until the player reconnects by hand. With the cache at0, the same in-place load is followed by one reconnect with[addons:'de_eldorado,<addon>'].After (this branch):
Downloading Addons (<addon>), one reconnect,[addons:'de_eldorado,<addon>'], both mounted[addons:'de_debris,<addon>'][addons:'de_poseidon,<addon>'][addons:'<addon>'][addons:'<workshop map>,<addon>'][addons:'de_eldorado,<addon>'][addons:'de_eldorado,<addon>'], both mounted, no extra download0: Valve map → de_eldorado[de_eldorado], then one reconnect with[addons:'de_eldorado,<addon>']mm_extra_addons: Valve map → de_eldoradoNo reconnect loops and no missing content in any case: every change took at most one reconnect. "In game after" runs from the
changelevelto the client being in game, by the client's whole-second stamps.Client console for Valve map → de_eldorado:
Built by this repository's workflow on the fork (Windows, SteamRT3 and SteamRT4): https://github.com/SixFive7/MultiAddonManager/actions/runs/44670162240. It gives the same compiler warnings as main's run, none from this change.
Cost
mm_cache_clients_with_addons 0, or for a client that is not recorded as having the addon, nothing changes. The client changes level in place and the addon follows after one reconnect, as in v1.7.4.