IVision::ForEachRecognized<ConsiderRecognizedSet>
0x0075dc80 · 796 bytes · __thiscall
_ZN7IVision17ForEachRecognizedI21ConsiderRecognizedSetEEbRT_
Decompiled
bool (2 params)
/* bool IVision::ForEachRecognized<ConsiderRecognizedSet>(ConsiderRecognizedSet&) */
bool __thiscall
IVision::ForEachRecognized<ConsiderRecognizedSet>(IVision *this,ConsiderRecognizedSet *param_1)
{
float fVar1;
uint uVar2;
int *piVar3;
code *pcVar4;
char cVar5;
int *piVar6;
undefined4 uVar7;
Vector *pVVar8;
Vector *pVVar9;
int *piVar10;
undefined4 uVar11;
int iVar12;
undefined *puVar13;
undefined1 *puVar14;
int iVar15;
int in_GS_OFFSET;
int local_34;
Color local_24;
undefined1 local_23;
undefined1 local_22;
undefined1 local_21;
int local_20;
local_34 = 0;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
iVar15 = 0;
if (0 < *(int *)(this + 0x38)) {
do {
fVar1 = (float)((uint *)(*(int *)(this + 0x2c) + iVar15))[4];
if ((((fVar1 < *(float *)(gpGlobals + 0xc) || fVar1 == *(float *)(gpGlobals + 0xc)) &&
(uVar2 = *(uint *)(*(int *)(this + 0x2c) + iVar15), uVar2 != 0xffffffff)) &&
(puVar13 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar13 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar13 + 8) == uVar2 >> 0xc &&
(piVar3 = *(int **)(puVar13 + 4), piVar3 != (int *)0x0)))) {
piVar6 = (int *)(**(code **)(*piVar3 + 0x144))(piVar3);
if ((piVar6 != (int *)0x0) &&
((cVar5 = (**(code **)(*piVar6 + 300))(piVar6), cVar5 != '\0' &&
(cVar5 = (**(code **)(**(int **)param_1 + 0xd8))(*(int **)param_1,piVar6), cVar5 != '\0'
)))) {
if (*(int *)(param_1 + 8) == 0) {
*(int **)(param_1 + 8) = piVar6;
}
else {
piVar10 = (int *)(**(code **)(**(int **)param_1 + 200))(*(int **)param_1);
uVar7 = *(undefined4 *)(param_1 + 8);
pcVar4 = *(code **)(*piVar10 + 0xcc);
uVar11 = (**(code **)(**(int **)param_1 + 0xb4))(*(int **)param_1);
uVar7 = (*pcVar4)(piVar10,*(undefined4 *)param_1,uVar11,uVar7,piVar6);
*(undefined4 *)(param_1 + 8) = uVar7;
}
}
if (fVar1 < *(float *)(param_1 + 4) || fVar1 == *(float *)(param_1 + 4)) {
cVar5 = INextBot::IsDebugging(*(INextBot **)param_1,0x20);
if ((cVar5 != '\0') &&
(piVar6 = (int *)(**(code **)(**(int **)param_1 + 0xc4))(*(int **)param_1),
piVar6 != (int *)0x0)) {
pVVar8 = (Vector *)(**(code **)(*piVar3 + 0x288))(piVar3);
pVVar9 = (Vector *)(**(code **)(*piVar6 + 0xb8))(piVar6);
NDebugOverlay::Line(pVVar9,pVVar8,0xff,0,0,false,0.2);
}
}
else {
cVar5 = INextBot::IsDebugging(*(INextBot **)param_1,0x20);
if (cVar5 != '\0') {
if (piVar3[0xc] == 0) {
iVar12 = 0;
}
else {
iVar12 = piVar3[0xc] - *(int *)(gpGlobals + 0x58) >> 4;
}
puVar14 = &DAT_00d539c2;
if ((undefined1 *)piVar3[0x1f] != (undefined1 *)0x0) {
puVar14 = (undefined1 *)piVar3[0x1f];
}
uVar7 = (**(code **)(**(int **)param_1 + 0x13c))(*(int **)param_1);
local_24 = 0;
local_23 = 0xff;
local_22 = 0;
local_21 = 0xff;
ConColorMsg(&local_24,"%3.2f: %s caught sight of %s(#%d)\n",
(double)*(float *)(gpGlobals + 0xc),uVar7,puVar14,iVar12);
piVar6 = (int *)(**(code **)(**(int **)param_1 + 0xc4))(*(int **)param_1);
if (piVar6 != (int *)0x0) {
pVVar8 = (Vector *)(**(code **)(*piVar3 + 0x288))(piVar3);
pVVar9 = (Vector *)(**(code **)(*piVar6 + 0xb8))(piVar6);
NDebugOverlay::Line(pVVar9,pVVar8,0xff,0xff,0,false,0.2);
}
}
(**(code **)(**(int **)param_1 + 0x50))(*(int **)param_1,piVar3);
}
}
local_34 = local_34 + 1;
iVar15 = iVar15 + 0x14;
} while (local_34 < *(int *)(this + 0x38));
}
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return 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.