CBaseTrigger::GetTouchedEntityOfType
0x00b16cc0 · 145 bytes · __thiscall
_ZN12CBaseTrigger22GetTouchedEntityOfTypeEPKc
Decompiled
undefined (2 params)
/* CBaseTrigger::GetTouchedEntityOfType(char const*) */
CBaseEntity * __thiscall CBaseTrigger::GetTouchedEntityOfType(CBaseTrigger *this,char *param_1)
{
int iVar1;
uint uVar2;
char *pcVar3;
char cVar4;
undefined *puVar5;
int iVar6;
CBaseEntity *this_00;
iVar6 = 0;
iVar1 = *(int *)(this + 0x560);
if (0 < iVar1) {
do {
this_00 = (CBaseEntity *)0x0;
uVar2 = *(uint *)(*(int *)(this + 0x554) + iVar6 * 4);
pcVar3 = pcRam0000007c;
if (((uVar2 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar2 >> 0xc)) {
this_00 = *(CBaseEntity **)(puVar5 + 4);
pcVar3 = *(char **)(this_00 + 0x7c);
}
if ((param_1 == pcVar3) ||
(cVar4 = CBaseEntity::ClassMatchesComplex(this_00,param_1), cVar4 != '\0')) {
return this_00;
}
iVar6 = iVar6 + 1;
} while (iVar6 != iVar1);
}
return (CBaseEntity *)0x0;
}
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.