CBaseEntity::RegisterThinkContext
0x00410a00 · 145 bytes · __thiscall
_ZN11CBaseEntity20RegisterThinkContextEPKc
Decompiled
undefined (2 params)
/* CBaseEntity::RegisterThinkContext(char const*) */
void __thiscall CBaseEntity::RegisterThinkContext(CBaseEntity *this,char *param_1)
{
int iVar1;
undefined4 local_40 [4];
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
iVar1 = GetIndexForThinkContext(this,param_1);
if (iVar1 != -1) {
return;
}
_V_memset((thinkfunc_t *)&local_30,0,0x14);
local_30 = 0;
local_2c = 0;
local_24 = 0;
AllocPooledString((char *)local_40);
local_28 = local_40[0];
CUtlVector<thinkfunc_t,CUtlMemory<thinkfunc_t,int>>::InsertBefore
((CUtlVector<thinkfunc_t,CUtlMemory<thinkfunc_t,int>> *)(this + 0xa4),
*(int *)(this + 0xb0),(thinkfunc_t *)&local_30);
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.