Skip to content

API: Implement RG_CBasePlayer_HandleSignals hook - #399

Open
JohanCorn wants to merge 1 commit into
rehlds:masterfrom
JohanCorn:implement-handle-signals-hook
Open

JohanCorn wants to merge 1 commit into
rehlds:masterfrom
JohanCorn:implement-handle-signals-hook

Conversation

@JohanCorn

@JohanCorn JohanCorn commented Sep 19, 2026 •

Copy link
Copy Markdown

🖤

Expose the new ReGameDLL CBasePlayer::HandleSignals hookchain to plugins.

Purpose

Exposes the CBasePlayer_HandleSignals hookchain added in rehlds/ReGameDLL_CS#1195 as RG_CBasePlayer_HandleSignals, so AMXX plugins can run code before or after the zone signal update (buy, bomb, rescue, escape and VIP safety zones), or skip it with HC_SUPERCEDE.

Supersedes #379, which was closed when my fork was deleted.

Approach

Adds RG_CBasePlayer_HandleSignals and its callback, using the updated ReGameDLL API header.

Open Questions and Pre-Merge TODOs

  • API: Implement CBasePlayer::HandleSignals hook ReGameDLL_CS#1195 is merged (this PR uses the header from it).
  • Built on Windows (MSVC v143, Release, Win32) together with the ReGameDLL change.
  • Tested on a dedicated server with a plugin:
    • the pre and post hooks are called for the player
    • HC_SUPERCEDE skips the original function and leaves the player's signal state unchanged, the post hook still runs
    • the original runs again with HC_CONTINUE, and disabling and enabling the hook works
  • Green CI run on this PR.

Learning

Expose the new ReGameDLL CBasePlayer::HandleSignals hookchain to
plugins.
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.

1 participant