You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pass return value to WeaponSwitchPost, WeaponCanUsePost, WeaponCanSwitchToPost #2532
SDKHook_ReloadPost already passes the engine function's return value into the callback: void OnReloadPost(int weapon, bool bSuccess)
The following hooks also return meaningful bool values, but their Post callbacks do not expose them: SDKHook_WeaponSwitchPost SDKHook_WeaponCanUsePost SDKHook_WeaponCanSwitchToPost
Plugins need the real outcome e.g., whether a weapon switch actually succeeded. Adding the return value as an extra callback parameter, consistent with ReloadPost, would cover this cleanly.
@Kenzzer this might be a quick addition during the khook migration, or I'm happy to submit a PR once that branch lands.
Activity
Kenzzer commentedon Aug 3, 2026
I can shoulder the work, I rebase the branch every now and then so it's no biggie. But thank you for considering it!