sdkhooks: Allow overriding SDKHook_Think (#1397)

* Allow to block Think()

* Update SDKHookCB comment
This commit is contained in:
Einyux
2021-07-10 12:42:17 -07:00
committed by GitHub
parent fdfb8837d1
commit 823b55c22a
2 changed files with 7 additions and 2 deletions
+5 -1
View File
@@ -1458,7 +1458,11 @@ void SDKHooks::Hook_StartTouchPost(CBaseEntity *pOther)
void SDKHooks::Hook_Think()
{
Call(META_IFACEPTR(CBaseEntity), SDKHook_Think);
cell_t result = Call(META_IFACEPTR(CBaseEntity), SDKHook_Think);
if(result >= Pl_Handled)
RETURN_META(MRES_SUPERCEDE);
RETURN_META(MRES_IGNORED);
}
+2 -1
View File
@@ -237,11 +237,12 @@ typeset SDKHookCB
function void (int client);
// Spawn
// Think
function Action (int entity);
// GroundEntChanged
// SpawnPost
// Think/Post
// ThinkPost
// VPhysicsUpdate/Post
function void (int entity);