Fixed HamExecuteB and made its system a bit more logical.

This commit is contained in:
Steve Dudenhoeffer
2007-05-04 15:42:02 +00:00
parent fb5e7dbfdb
commit bd2ad31f5e
9 changed files with 91 additions and 579 deletions

View File

@@ -13,6 +13,10 @@ extern CVector<Hook *> hooks[HAM_LAST_ENTRY_DONT_USE_ME_LOL];
void FailPlugin(AMX *amx, int id, int err, const char *reason);
inline void *GetFunction(void *pthis, int id)
{
return GetVTableEntry(pthis, hooklist[id].vtid, Offsets.GetBase());
}
inline void *_GetFunction(void *pthis, int id)
{
void **vtbl=GetVTable(pthis, Offsets.GetBase());
@@ -30,11 +34,13 @@ inline void *GetFunction(void *pthis, int id)
// function.
if (func==(*i)->tramp)
{
printf("Func=0x%08X\n",reinterpret_cast<unsigned int>((*i)->func));
return (*i)->func;
}
}
// this is an original function
printf("Func=0x%08X\n",reinterpret_cast<unsigned int>(func));
return func;
}