Change SDKHooks to VTable Hooks (bug 6070, r=psychonic).
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user