Improve logical entity support in SDKHooks natives (bug 6069, r=asherkin).

This commit is contained in:
Nicholas Hastings
2014-03-21 22:09:15 -04:00
parent 9215ddcf8a
commit 451c90b932
4 changed files with 20 additions and 46 deletions
+1 -1
View File
@@ -528,7 +528,7 @@ HookReturn SDKHooks::Hook(int entity, SDKHookType type, IPluginFunction *callbac
if(!g_HookTypes[type].supported)
return HookRet_NotSupported;
CBaseEntity *pEnt = UTIL_GetCBaseEntity(entity);
CBaseEntity *pEnt = gamehelpers->ReferenceToEntity(entity);
if(!pEnt)
return HookRet_InvalidEntity;
if(type < 0 || type >= SDKHook_MAXHOOKS)