FloodSelectCollector::operator()
0x00976950 · 471 bytes · __thiscall
_ZN20FloodSelectCollectorclEP8CNavArea
Decompiled
undefined (2 params)
/* FloodSelectCollector::TEMPNAMEPLACEHOLDERVALUE(CNavArea*) */
undefined4 __thiscall FloodSelectCollector::operator()(FloodSelectCollector *this,CNavArea *param_1)
{
char cVar1;
undefined4 uVar2;
int iVar3;
longdouble lVar4;
float fVar5;
float fVar6;
float fVar7;
float fVar8;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
cVar1 = CNavMesh::IsInSelectedSet(TheNavMesh,param_1);
if ((((cVar1 != '\0') ||
((*(int *)(this + 4) != 0xffff && (*(int *)(this + 4) != *(int *)(param_1 + 0x160))))) ||
((*(uint *)(this + 8) != 0 && ((*(uint *)(param_1 + 300) & *(uint *)(this + 8)) == 0)))) ||
(((*(uint *)(this + 0xc) != 0 && ((*(uint *)(param_1 + 300) & *(uint *)(this + 0xc)) != 0)) ||
((fVar6 = *(float *)(this + 0x18), 0.0 < fVar6 &&
(iVar3 = *(int *)this, fVar8 = *(float *)(iVar3 + 0x2c) - *(float *)(param_1 + 0x2c),
fVar5 = *(float *)(iVar3 + 0x34) - *(float *)(param_1 + 0x34),
fVar7 = *(float *)(iVar3 + 0x30) - *(float *)(param_1 + 0x30),
fVar6 * fVar6 < fVar5 * fVar5 + fVar8 * fVar8 + fVar7 * fVar7)))))) {
LAB_00976986:
uVar2 = 0;
}
else {
if (0 < *(int *)(nav_flood_select_tolerance._28_4_ + 0x30)) {
fVar6 = (float)*(int *)(nav_flood_select_tolerance._28_4_ + 0x30);
if (((int)(fVar6 + *(float *)(*(int *)this + 0x34)) < (int)*(float *)(param_1 + 0x34)) ||
((int)*(float *)(param_1 + 0x34) < (int)(*(float *)(*(int *)this + 0x34) - fVar6)))
goto LAB_00976986;
}
iVar3 = 0;
do {
if (iVar3 == 2) {
local_28 = *(undefined4 *)(param_1 + 0x10);
local_24 = *(undefined4 *)(param_1 + 0x14);
local_20 = *(undefined4 *)(param_1 + 0x18);
}
else if (iVar3 == 3) {
local_24 = *(undefined4 *)(param_1 + 0x14);
local_20 = *(undefined4 *)(param_1 + 0x28);
local_28 = *(undefined4 *)(param_1 + 4);
}
else if (iVar3 == 1) {
local_24 = *(undefined4 *)(param_1 + 8);
local_20 = *(undefined4 *)(param_1 + 0x24);
local_28 = *(undefined4 *)(param_1 + 0x10);
}
else {
local_28 = *(undefined4 *)(param_1 + 4);
local_24 = *(undefined4 *)(param_1 + 8);
local_20 = *(undefined4 *)(param_1 + 0xc);
}
lVar4 = (longdouble)CNavArea::GetLightIntensity(param_1,(Vector *)&local_28);
fVar6 = (float)lVar4;
if ((fVar6 < *(float *)(this + 0x10)) ||
(*(float *)(this + 0x14) <= fVar6 && fVar6 != *(float *)(this + 0x14))) goto LAB_00976986;
iVar3 = iVar3 + 1;
} while (iVar3 != 4);
CNavMesh::AddToSelectedSet(TheNavMesh,param_1);
uVar2 = 1;
*(int *)(this + 0x1c) = *(int *)(this + 0x1c) + 1;
}
return uVar2;
}
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.