Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
Adds a new automatic gamedata update mechanism that checks a remote ETag and downloads an updated gamedata.json when needed.
- Introduces
TryUpdateGameConfig()in a new updater module to fetch and store gamedata based on ETag differences - Adds
AutoUpdateEnabledandAutoUpdateURLsettings to core config (native and managed) and example config - Updates build scripts (CMake and platform makefiles) to include OpenSSL and new updater source files
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/mm_plugin.cpp | Invokes the updater when AutoUpdateEnabled is true |
| src/core/gameconfig_updater.h / cpp | New HTTP-based ETag checker and downloader for gamedata.json |
| src/core/coreconfig.h / coreconfig.cpp | Added AutoUpdateEnabled and AutoUpdateURL config fields |
| managed/CounterStrikeSharp.API/Core/CoreConfig.cs | Exposed new update settings in the managed CoreConfigData |
| makefiles/windows.base.cmake | Linked OpenSSL libraries for SSL support |
| makefiles/linux.base.cmake | Linked OpenSSL libraries for SSL support |
| CMakeLists.txt | Added OpenSSL find and listed updater headers & sources |
| configs/addons/.../core.example.json | Updated example JSON with new auto-update settings |
Comments suppressed due to low confidence (3)
src/core/gameconfig_updater.cpp:21
- [nitpick] The
@returntag is present but lacks a description. Please add a brief explanation of what the boolean return value indicates (e.g.,trueon success,falseon failure).
/// @return
src/core/gameconfig_updater.cpp:22
- [nitpick] Consider adding unit or integration tests for
TryUpdateGameConfig()to cover scenarios such as unchanged ETag, successful download, and various failure modes (network error, file I/O error).
bool TryUpdateGameConfig()
src/mm_plugin.cpp:125
- The call to
update::TryUpdateGameConfig()uses the unqualifiedupdatenamespace. The function is declared incounterstrikesharp::update, so either qualify the call (counterstrikesharp::update::TryUpdateGameConfig()) or add an appropriateusingdeclaration.
if (!update::TryUpdateGameConfig())
Contributor
|
don't forget to update the docs page with the new core config entries |
KillStr3aK
approved these changes
Jul 9, 2025
This was referenced Aug 4, 2025
This was referenced Aug 15, 2025
This was referenced Sep 2, 2025
This was referenced Oct 16, 2025
This was referenced Oct 27, 2025
This was referenced Dec 8, 2025
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.
Adds a basic automatic gamedata update system which will check the latest gamedata.json file from a CDN and download the new gamedata file if the ETag is different.
Gamedata updates can be completed through a PR to the CS2-Gamedata repo which will verify valid sigs and then sync with the CDN on merge.