CGlobalEntityList::FindEntityByOutputTarget
0x0067c8d0 · 247 bytes · __thiscall
_ZN17CGlobalEntityList24FindEntityByOutputTargetEP11CBaseEntity8string_t
Decompiled
undefined (3 params)
/* CGlobalEntityList::FindEntityByOutputTarget(CBaseEntity*, string_t) */
int * __thiscall
CGlobalEntityList::FindEntityByOutputTarget(CGlobalEntityList *this,int *param_1,undefined4 param_3)
{
int *piVar1;
int iVar2;
uint *puVar3;
int *piVar4;
int *piVar5;
int iVar6;
int iVar7;
int *local_24;
if (param_1 == (int *)0x0) {
local_24 = *(int **)(this + 0x10004);
}
else {
puVar3 = (uint *)(**(code **)(*param_1 + 0xc))(param_1);
local_24 = *(int **)(this + (*puVar3 & 0xfff) * 0x10 + 0x10);
}
do {
if (local_24 == (int *)0x0) {
return (int *)0x0;
}
while (piVar1 = (int *)*local_24, piVar1 != (int *)0x0) {
for (piVar4 = (int *)(**(code **)(*piVar1 + 0x30))(piVar1); piVar4 != (int *)0x0;
piVar4 = (int *)piVar4[3]) {
iVar2 = piVar4[1];
iVar7 = 0;
if (0 < iVar2) {
do {
piVar5 = (int *)(iVar7 * 0x40 + *piVar4);
if (((*piVar5 == 0xb) && ((*(byte *)((int)piVar5 + 0xe) & 0x10) != 0)) &&
(iVar6 = CBaseEntityOutput::GetActionForTarget
((CBaseEntityOutput *)((int)piVar1 + piVar5[2]),param_3),
iVar6 != 0)) {
return piVar1;
}
iVar7 = iVar7 + 1;
} while (iVar7 != iVar2);
}
}
local_24 = (int *)local_24[3];
if (local_24 == (int *)0x0) {
return (int *)0x0;
}
}
DevWarning("NULL entity in global entity list!\n");
local_24 = (int *)local_24[3];
} while( true );
}
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.