Change SDKHooks to VTable Hooks (bug 6070, r=psychonic).

This commit is contained in:
Kyle Sanderson
2014-03-23 22:11:06 -06:00
parent ee595978f8
commit 9abac06e85
4 changed files with 680 additions and 527 deletions
+1 -6
View File
@@ -93,12 +93,7 @@ cell_t Native_Unhook(IPluginContext *pContext, const cell_t *params)
int entity = (int)params[1];
SDKHookType type = (SDKHookType)params[2];
IPluginFunction *callback = pContext->GetFunctionById(params[3]);
for(int i = g_HookList.Count() - 1; i >= 0; i--)
{
if(g_HookList[i].entity == entity && g_HookList[i].type == type && g_HookList[i].callback == callback)
g_Interface.Unhook(i);
}
g_Interface.Unhook(entity, type, callback);
return 0;
}