IVision::ForEachRecognized<ThreatCounter>
0x00923070 · 201 bytes · __thiscall
_ZN7IVision17ForEachRecognizedI13ThreatCounterEEbRT_
Decompiled
bool (2 params)
/* bool IVision::ForEachRecognized<ThreatCounter>(ThreatCounter&) */
bool __thiscall IVision::ForEachRecognized<ThreatCounter>(IVision *this,ThreatCounter *param_1)
{
uint uVar1;
char cVar2;
int *piVar3;
undefined *puVar4;
int iVar5;
int iVar6;
iVar6 = 0;
iVar5 = 0;
if (*(int *)(this + 0x38) < 1) {
return true;
}
do {
while ((((*(float *)(gpGlobals + 0xc) < (float)((uint *)(*(int *)(this + 0x2c) + iVar5))[4] ||
(uVar1 = *(uint *)(*(int *)(this + 0x2c) + iVar5), uVar1 == 0xffffffff)) ||
(puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
(((*(uint *)(puVar4 + 8) != uVar1 >> 0xc ||
(piVar3 = *(int **)(puVar4 + 4), piVar3 == (int *)0x0)) ||
(piVar3 = (int *)(**(code **)(*piVar3 + 0x148))(piVar3), piVar3 == (int *)0x0))))) {
LAB_00923090:
iVar6 = iVar6 + 1;
iVar5 = iVar5 + 0x14;
if (*(int *)(this + 0x38) <= iVar6) {
return true;
}
}
piVar3 = (int *)(**(code **)(*piVar3 + 0xc4))(piVar3);
cVar2 = (**(code **)(*piVar3 + 0x114))(piVar3,2);
if (cVar2 == '\0') goto LAB_00923090;
iVar6 = iVar6 + 1;
iVar5 = iVar5 + 0x14;
*(int *)param_1 = *(int *)param_1 + 1;
if (*(int *)(this + 0x38) <= iVar6) {
return true;
}
} 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.