[TF2] fix: Client not updating workshop maps #1327
Open
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.
Description
Currently the client waits for Steam to notice a pending update for workshop maps, during this entire time GetItemState will say the map is up-to-date. This even happens when the workshop map is manually fetched using SendQueryUGCRequest.
This issue exists also on dedicated servers and the old code already accounted for this issue, where the game always called DownloadItem, regardless of GetItemState saying the workshop map needed an update or not.
The result is that the dedicated server will update the workshop map but the client will not, resulting in a map mismatch and the client getting kicked.
This PR makes the dedicated server behavior also apply to the client, DownloadItem does an update check for us so no need to worry about double-downloading workshop maps, if there is no update nothing will be downloaded.