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.
SDKHook_ReloadPostalready 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_WeaponSwitchPostSDKHook_WeaponCanUsePostSDKHook_WeaponCanSwitchToPostPlugins 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.