Skip to content

feat: use latest SourceMod methodmaps and declarations - #27

Merged
Rushaway merged 1 commit into
masterfrom
feat/modern-sm-methods
Oct 5, 2026
Merged

Rushaway merged 1 commit into
masterfrom
feat/modern-sm-methods

Conversation

@Rushaway

Copy link
Copy Markdown
Member

Closes #26

Changes

  • Handle ConVar → ConVar methodmap (.IntValue, .AddChangeHook)
  • OpenFile/ReadFileLine/CloseHandle → File methodmap (.ReadLine, delete)
  • WritePack*/ReadPack* → DataPack methodmap
  • PbReadString/BfReadString → Protobuf/BfRead methodmaps
  • PbSet*/BfWrite* → Protobuf/BfWrite via UserMessageToProtobuf/UserMessageToBfWrite
  • Removed the legacy CanTestFeatures()/GetFeatureStatus guard around GetUserMessageType() (always available on supported SM versions)

Fixes found along the way

  • Format(TextColors[i], sizeof(TextColors), ...) used the outer array size (100) instead of the string size (256), so long color entries were truncated. Now uses strcopy(..., sizeof(TextColors[]), ...)
  • Clients are stored in the timer pack as userids rather than indices, so a slot reused before the timer fires cannot get the message
  • Added a null check on StartMessage
  • Buffer sizes in the timer aligned to 256

Version bumped to 1.2.3.

🤖 Generated with Claude Code

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 7c20894 into master Oct 5, 2026
7 checks passed
@Rushaway
Rushaway deleted the feat/modern-sm-methods branch October 5, 2026 21:22
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 latest sm decls/methods

2 participants