TestOverlapping::OverlapsExistingArea
0x00730a00 · 490 bytes · __thiscall
_ZN15TestOverlapping20OverlapsExistingAreaEv
Decompiled
undefined (1 param)
/* TestOverlapping::OverlapsExistingArea() */
undefined4 __thiscall TestOverlapping::OverlapsExistingArea(TestOverlapping *this)
{
float fVar1;
float fVar2;
float fVar3;
undefined4 uVar4;
float fVar5;
float fVar6;
CNavArea *local_3c;
CNavLadder *local_38;
float local_34;
float local_30;
float local_2c;
float local_28;
float local_24;
float local_20;
local_3c = (CNavArea *)0x0;
local_38 = (CNavLadder *)0x0;
fVar1 = *(float *)(this + 4);
local_34 = *(float *)this + 12.5;
fVar2 = *(float *)(this + 0x28);
fVar3 = *(float *)(this + 0x24);
do {
if (fVar3 <= local_34) {
return 0;
}
if (fVar1 + 12.5 < fVar2) {
local_30 = fVar1 + 12.5;
do {
fVar5 = *(float *)(this + 0x28) - *(float *)(this + 4);
fVar6 = *(float *)(this + 0x24) - *(float *)this;
if ((fVar5 == 0.0) || (fVar6 == 0.0)) {
local_20 = *(float *)(this + 0x14);
}
else {
fVar5 = (local_30 - *(float *)(this + 4)) / fVar5;
fVar6 = (local_34 - *(float *)this) / fVar6;
if (1.0 <= fVar5) {
fVar5 = 1.0;
}
if (fVar5 <= 0.0) {
fVar5 = 0.0;
}
if (1.0 <= fVar6) {
fVar6 = 1.0;
}
if (fVar6 <= 0.0) {
fVar6 = 0.0;
}
local_20 = (*(float *)(this + 0x14) - *(float *)(this + 8)) * fVar6 + *(float *)(this + 8)
;
local_20 = (((*(float *)(this + 0x2c) - *(float *)(this + 0x20)) * fVar6 +
*(float *)(this + 0x20)) - local_20) * fVar5 + local_20;
}
local_2c = local_20 - 18.0;
local_20 = local_20 + 35.5;
local_28 = local_34;
local_24 = local_30;
uVar4 = CNavMesh::FindNavAreaOrLadderAlongRay
(TheNavMesh,(Vector *)&local_34,(Vector *)&local_28,&local_3c,&local_38,
(CNavArea *)0x0);
if (((char)uVar4 != '\0') && (local_3c != (CNavArea *)0x0)) {
return uVar4;
}
local_30 = local_30 + 25.0;
} while (local_30 < fVar2);
}
local_34 = local_34 + 25.0;
} 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.