Quote:
Originally Posted by Afronanny
Unhook should stop the output, yes. I won't be able to help debug this until Sunday when I get back to my main PC. It sounds like it could be a bug in the extension. For now though, you can just return Plugin_Continue in the callback to mimic an unhook.
|
The name of array props is the index like "005" instead of the array name.
Don't know if this breaks anything else, but works fine.
Code:
diff -r d5c38c561197 extension.cpp
--- a/extension.cpp Fri Nov 02 17:44:16 2012 -0400
+++ b/extension.cpp Wed Mar 20 22:35:41 2013 +0100
@@ -672,6 +672,9 @@
{
return pContext->ThrowNativeError("Could not find element %d in %s", element, info.prop->GetName());
}
+
+ if(pProp->GetParentArrayPropName() == NULL)
+ pProp->SetParentArrayPropName(info.prop->GetName());
SendPropHook hook;
hook.objectID = entity;
@@ -721,7 +724,7 @@
IPluginFunction *callback = pContext->GetFunctionById(params[5]);
for (int i = 0; i < g_Hooks.Count(); i++)
{
- if (g_Hooks[i].Element == element && g_Hooks[i].PropType == propType && g_Hooks[i].pCallback == callback && !strcmp(g_Hooks[i].pVar->GetName(), propName) && g_Hooks[i].objectID == entity)
+ if (g_Hooks[i].Element == element && g_Hooks[i].PropType == propType && g_Hooks[i].pCallback == callback && !strcmp(g_Hooks[i].pVar->GetParentArrayPropName(), propName) && g_Hooks[i].objectID == entity)
{
g_SendProxyManager.UnhookProxy(i);
}
__________________