Skip to content

feat: use newest SourceMod decls and methodmaps - #29

Merged
Rushaway merged 1 commit into
masterfrom
feat/newest-sm-decls
Oct 5, 2026
Merged

Rushaway merged 1 commit into
masterfrom
feat/newest-sm-decls

Conversation

@Rushaway

Copy link
Copy Markdown
Member

Summary

Modernizes the plugin to use the newest SourceMod API (closes #28).

  • LoadGameConfigFile / GameConfGetAddress → GameData methodmap (new GameData(...), .GetAddress(...))
  • DHookCreateDetour / DHookAddParam / DHookEnableDetour → DynamicDetour methodmap (new DynamicDetour(...), .AddParam(...), .Enable(Hook_Pre, ...))
  • DHookGetParam(hParams, 1) → DHookParam.Get(1) (callback now takes a DHookParam)
  • Removed the FloatMod / operator% compatibility shim, since float % is native in SourceMod 1.12 (the version CI builds against)
  • Bumped plugin version to 1.0.4
  • Updated .github/copilot-instructions.md examples to reflect the new API

No behavior change intended.

Testing

  • Compiled locally with SourcePawn Compiler 1.12.0.7253: no errors, no warnings.
  • Not tested on a live server.

🤖 Generated with Claude Code

- Replace LoadGameConfigFile/GameConfGetAddress with the GameData methodmap
- Replace DHookCreateDetour/DHookAddParam/DHookEnableDetour with DynamicDetour
- Use DHookParam.Get instead of DHookGetParam
- Drop the FloatMod/operator% shim (native since SourceMod 1.12)
- Bump version to 1.0.4 and update Copilot instructions

Closes #28

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings September 29, 2026 18:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Rushaway
Rushaway merged commit 4bae1ea into master Oct 5, 2026
7 checks passed
@Rushaway
Rushaway deleted the feat/newest-sm-decls branch October 5, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat req: use newest sm decls/methods

2 participants