CFireSphere::EnumElement
0x0069da20 · 251 bytes · __thiscall
_ZN11CFireSphere11EnumElementEP13IHandleEntity
Decompiled
undefined (2 params)
/* CFireSphere::EnumElement(IHandleEntity*) */
undefined4 __thiscall CFireSphere::EnumElement(CFireSphere *this,IHandleEntity *param_1)
{
uint uVar1;
int *piVar2;
char cVar3;
uint *puVar4;
CBaseEntity *this_00;
int iVar5;
puVar4 = (uint *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
uVar1 = *puVar4;
if (((((uVar1 != 0xffffffff) &&
(iVar5 = (uVar1 & 0xfff) * 0x10, *(uint *)(gEntList + iVar5 + 8) == uVar1 >> 0xc)) &&
(piVar2 = *(int **)(gEntList + iVar5 + 4), piVar2 != (int *)0x0)) &&
((this_00 = (CBaseEntity *)(**(code **)(*piVar2 + 0x18))(piVar2),
this_00 != (CBaseEntity *)0x0 &&
((*(char **)(this_00 + 0x7c) == "env_fire" ||
(cVar3 = CBaseEntity::ClassMatchesComplex(this_00,"env_fire"), cVar3 != '\0')))))) &&
((this[0x20] == (CFireSphere)0x0 || (0.0 < *(float *)(this_00 + 0x460))))) {
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
if ((*(float *)(this + 0xc) - *(float *)(this_00 + 0x2e8)) *
(*(float *)(this + 0xc) - *(float *)(this_00 + 0x2e8)) +
(*(float *)(this + 4) - *(float *)(this_00 + 0x2e0)) *
(*(float *)(this + 4) - *(float *)(this_00 + 0x2e0)) +
(*(float *)(this + 8) - *(float *)(this_00 + 0x2e4)) *
(*(float *)(this + 8) - *(float *)(this_00 + 0x2e4)) < *(float *)(this + 0x10)) {
if (*(int *)(this + 0x18) <= *(int *)(this + 0x1c)) {
return 1;
}
*(CBaseEntity **)(*(int *)(this + 0x14) + *(int *)(this + 0x1c) * 4) = this_00;
*(int *)(this + 0x1c) = *(int *)(this + 0x1c) + 1;
}
}
return 0;
}
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.