-
-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API
: Implement RG_PM_LadderMove
hook
#254
Conversation
Related to rehlds#82
useful to create plugins like this: https://dev-cs.ru/threads/19404/ |
@s1lentq merge it, please :) |
@ShadowsAdi @s1lentq I think this hook should keep the schema of PM_AirMove implementation, keeping physent parameter and an additional player index parameter |
@s1lentq // PM_LadderMove hook
typedef IHookChainImpl<void, physent_t *, int> CReGameHook_PM_LadderMove;
typedef IHookChainRegistryImpl<void, physent_t *, int> CReGameHookRegistry_PM_LadderMove; pm_shared.cpp LINK_HOOK_VOID_CHAIN(PM_LadderMove, (physent_t *pLadder, int playerIndex = 0), pLadder, pmove->player_index + 1);
void EXT_FUNC __API_HOOK(PM_LadderMove)(physent_t *pLadder, int playerIndex)
{
PM_LadderMove_internal(pLadder);
}
void PM_LadderMove_internal(physent_t *pLadder)
{
// ...
} regamedll_api.h // PM_LadderMove hook
typedef IHookChain<void, physent_t *, int> IReGameHook_PM_LadderMove;
typedef IHookChainRegistry<void, physent_t *, int> IReGameHookRegistry_PM_LadderMove; |
@dystopm I agree about the physent argument. |
I see you ended adding the physent argument which I think is fine guessing we can add logic in future to change physent structure values, so it's a yes, I agree with you. In that case, shouldn't PM_AirMove be modified? PD: there's a few of functions which I coded in my own fork which I find useful to be added, I'll be doing a commit taking advantage of you are merging |
No, we should keep API compatibility at least until we update the major version |
Related to #82