Path::PostProcess
0x00761ba0 · 1315 bytes · __thiscall
_ZN4Path11PostProcessEv
Decompiled
undefined (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* Path::PostProcess() */
void __thiscall Path::PostProcess(Path *this)
{
Path *pPVar1;
uint *puVar2;
undefined4 uVar3;
char cVar4;
int iVar5;
int iVar6;
Path *pPVar7;
Path *pPVar8;
longdouble lVar9;
float fVar10;
float fVar11;
float fVar12;
float fVar13;
float fVar14;
Vector *pVVar15;
Vector *pVVar16;
int local_44;
float local_40;
undefined4 local_34;
undefined4 local_30;
undefined4 local_28;
undefined4 local_24;
int local_20;
local_34 = 0;
local_30 = 0;
if (_towlower == 0) {
local_20 = 0;
}
else {
(**(code **)(_towlower + 0x50))
(_towlower,&local_34,0,0,0,0,"/data/src/game/server/nextbot/path/nextbotpath.cpp",
0x285,&PostProcess()::tm_fmt,"(%s)%s","NextBot","Path::PostProcess");
local_20 = _towlower;
}
iVar5 = _DAT_0105db00;
local_28 = local_34;
local_24 = local_30;
/* try { // try from 00761dfe to 00761e5e has its CatchHandler @ 00762124 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar6 = ThreadGetCurrentId(), iVar5 == iVar6)) {
if ((char *)*_DAT_0105d15c != "Path::PostProcess") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcaa4bc,(char *)0x0,0xca8906);
}
puVar2 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
*puVar2 = *puVar2 | 4;
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
pVVar16 = (Vector *)(this + 0x4448);
pVVar15 = pVVar16;
/* try { // try from 00761c5d to 00761cf3 has its CatchHandler @ 007620f7 */
lVar9 = (longdouble)IntervalTimer::Now();
if ((float)lVar9 != *(float *)(this + 0x444c)) {
/* try { // try from 007620c3 to 007620c5 has its CatchHandler @ 007620f7 */
(**(code **)(*(int *)(this + 0x4448) + 4))(pVVar16,this + 0x444c);
*(float *)(this + 0x444c) = (float)lVar9;
pVVar15 = pVVar16;
}
uVar3 = vec3_origin;
iVar5 = *(int *)(this + 0x4404);
if (iVar5 != 0) {
if (iVar5 != 1) {
if (iVar5 < 2) {
iVar5 = 0;
local_40 = 0.0;
iVar6 = 1;
}
else {
local_44 = 0;
local_40 = 0.0;
pPVar8 = this + 0x50;
pPVar7 = this + 4;
do {
pPVar1 = pPVar8 + -8;
fVar14 = *(float *)(pPVar8 + 8);
pVVar15 = (Vector *)(pPVar7 + 0x1c);
fVar13 = *(float *)pPVar8;
local_44 = local_44 + 1;
*(float *)(pPVar7 + 0x20) = *(float *)(pPVar8 + 4) - *(float *)(pPVar7 + 0xc);
*(float *)(pPVar7 + 0x24) = fVar14 - *(float *)(pPVar7 + 0x10);
*(float *)(pPVar7 + 0x1c) = fVar13 - *(float *)(pPVar7 + 8);
lVar9 = (longdouble)VectorNormalize(pVVar15);
pPVar8 = pPVar8 + 0x44;
*(float *)(pPVar7 + 0x2c) = local_40;
*(float *)(pPVar7 + 0x28) = (float)lVar9;
local_40 = (float)lVar9 + local_40;
pPVar7 = pPVar1;
} while (local_44 < *(int *)(this + 0x4404) + -1);
if (*(int *)(this + 0x4404) < 3) {
iVar5 = 0;
iVar6 = 1;
}
else {
pPVar8 = this + 0x78;
iVar6 = 1;
do {
iVar5 = iVar6;
if (*(float *)(pPVar8 + -0x18) == 0.0) {
fVar14 = *(float *)(pPVar8 + -0x58);
fVar13 = *(float *)(pPVar8 + -0x54);
fVar10 = SQRT(fVar13 * fVar13 + fVar14 * fVar14);
if (fVar10 == 0.0) {
fVar10 = 0.0;
fVar14 = 0.0;
}
else {
fVar10 = 1.0 / fVar10;
fVar14 = fVar14 * fVar10;
fVar10 = fVar10 * fVar13;
}
fVar13 = *(float *)(pPVar8 + -0x14);
fVar12 = *(float *)(pPVar8 + -0x10);
fVar11 = SQRT(fVar13 * fVar13 + fVar12 * fVar12);
if (fVar11 == 0.0) {
fVar11 = 0.5;
}
else {
fVar11 = 1.0 / fVar11;
fVar12 = fVar12 * fVar11;
fVar13 = fVar13 * fVar11;
fVar11 = (1.0 - (fVar12 * fVar10 + fVar13 * fVar14)) * 0.5;
if (fVar14 * fVar12 - fVar13 * fVar10 < 0.0) {
fVar11 = -fVar11;
}
}
*(float *)pPVar8 = fVar11;
}
else {
*(float *)pPVar8 = 0.0;
}
iVar6 = iVar5 + 1;
pPVar8 = pPVar8 + 0x44;
} while (iVar6 < *(int *)(this + 0x4404) + -1);
}
}
*(undefined4 *)(this + 0x34) = 0;
iVar5 = iVar5 * 0x44;
iVar6 = iVar6 * 0x44;
*(undefined4 *)(this + iVar6 + 0x20) = *(undefined4 *)(this + iVar5 + 0x20);
*(undefined4 *)(this + iVar6 + 0x24) = *(undefined4 *)(this + iVar5 + 0x24);
*(undefined4 *)(this + iVar6 + 0x28) = *(undefined4 *)(this + iVar5 + 0x28);
*(undefined4 *)(this + iVar6 + 0x2c) = 0;
*(float *)(this + iVar6 + 0x30) = local_40;
*(undefined4 *)(this + iVar6 + 0x34) = 0;
iVar5 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(pVVar15), iVar5 == iVar6)) {
cVar4 = CVProfNode::ExitScope();
if (cVar4 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (local_20 == 0) {
return;
}
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
return;
}
*(undefined4 *)(this + 0x2c) = 0;
*(undefined4 *)(this + 0x30) = 0;
*(undefined4 *)(this + 0x20) = uVar3;
uVar3 = DAT_01053d4c;
*(undefined4 *)(this + 0x34) = 0;
*(undefined4 *)(this + 0x24) = uVar3;
*(undefined4 *)(this + 0x28) = DAT_01053d50;
}
iVar5 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar6 = ThreadGetCurrentId(pVVar15), iVar5 == iVar6)) {
cVar4 = CVProfNode::ExitScope();
if (cVar4 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (local_20 == 0) {
return;
}
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
return;
}
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.