Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add source2 convar/concommand support #203

Merged
merged 4 commits into from
Feb 15, 2025

Conversation

GAMMACASE
Copy link
Member

@GAMMACASE GAMMACASE commented Feb 11, 2025

Split ConCommandBase usage into ProviderConCommand/ProviderConVar and add convar/concommand support for s2 titles.

The main reason for the split, is due to massive changes in s2, which doesn't use unified object for both convars and concommands, thus making it hard to work with under singular class name. For s1 titles these are typedefed as ConCommandBase under the hood and nothing has changed really.

This pr bumps mm version to 2.1, and adds few new functions to ISmmAPI interface, as well as bumps PLAPI version to 17, and adds few new functions to IMetamodListener interface. I've tried to not do major interface changes, thus old ConCommandBase Register/Unregister methods are still available and working altho I've marked them as deprecated as they only support s1 titles, s2 titles are meant to use newer methods (and they can't easily call these old methods since ConCommandBase is nonexistant in s2 which is what these old functions expect, so there shouldn't be the case where they accidentally call to it).

This pr also supersedes this pr #135 as per discussion with the author of it.

Side note: I've also added -Wno-sign-compare gcc flag to build scripts of mm and s2_sample_mm as these heavily depend on it, since there are numerous of places from sourcehook to hl2sdk where these warnings are thrown, and since build systems mm is using are mainly clang (which seems to be fine with the code by default as well as msvc) this shouldn't really affect anything other than provide an out of the box compilation availability for gcc compilers.

This pr resolves these issues #187, #166

If all is good this pr depends on alliedmodders/hl2sdk#154 and the same changes towards hl2sdk-dota

Also add convar/concommand support for s2 titles
@GAMMACASE GAMMACASE merged commit a0ef306 into alliedmodders:master Feb 15, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants