Open tmp64 opened 10 months ago
Despite having "GetDispatch" hook could be better (since this is the "inside" function), was not the already existing hook "GetEntityInit" not enough for WeaponMod?
You're right. I could just hook GetEntityInit
since it simply calls GetDispatch
. I'll check and report back later
ENTITYINIT GetEntityInit_internal(char *pClassName)
{
return (ENTITYINIT)GetDispatch(pClassName);
}
ENTITYINIT EXT_FUNC GetEntityInit_api(char *pClassName)
{
return g_RehldsHookchains.m_GetEntityInit.callChain(GetEntityInit_internal, pClassName);
}
ENTITYINIT GetEntityInit(char *pClassName)
{
return GetEntityInit_api(pClassName);
}
Yep, GetEntityInit
hook works just fine. GetDispatch
seems to be used as a generic dlsym
in the engine. I guess this PR could be left as is in case someone wants to hook GameDLL functions without a hooking library.
This PR adds a hook for
GetDispatch
function. It is used by WeaponMod.It additionally bumps the API version to 3.14
159265. #951 also bumped the version inrehlds/version/version.h
but I didn't. Let me know and I'll fix the commit.