CNavMesh::PostProcessCliffAreas
0x007293d0 · 883 bytes · __cdecl
_ZN8CNavMesh21PostProcessCliffAreasEv
Decompiled
undefined (0 params)
/* CNavMesh::PostProcessCliffAreas() */
void CNavMesh::PostProcessCliffAreas(void)
{
float fVar1;
int iVar2;
char cVar3;
float fVar4;
float fVar5;
float *pfVar6;
int local_104;
float local_ec;
float local_e8;
float local_e4;
float local_e0;
float local_dc;
float local_d8;
float local_d4;
float local_d0;
float local_cc;
float local_c8;
CGameTrace local_c4 [12];
float local_b8;
float local_b4;
float local_b0;
char local_8e;
char local_8d;
CGameTrace local_70 [20];
float local_5c;
char local_3a;
char local_39;
local_104 = 0;
if (0 < DAT_00fe6000) {
do {
iVar2 = *(int *)(TheNavAreas + local_104 * 4);
if ((*(byte *)(iVar2 + 0x55) & 0x80) == 0) {
fVar5 = 0.0;
LAB_00729412:
fVar1 = (float)((int)fVar5 + 1);
local_ec = (float)((uint)fVar1 & 3);
pfVar6 = &local_ec;
fVar4 = fVar5;
if (fVar5 == 2.8026e-45) goto LAB_00729560;
LAB_00729444:
if (fVar4 == 4.2039e-45) {
local_e8 = *(float *)(iVar2 + 4);
local_e4 = *(float *)(iVar2 + 0x14);
local_e0 = *(float *)(iVar2 + 0x28);
}
else if (fVar4 == 1.4013e-45) {
local_e4 = *(float *)(iVar2 + 8);
local_e8 = *(float *)(iVar2 + 0x10);
local_e0 = *(float *)(iVar2 + 0x24);
}
else {
local_e8 = *(float *)(iVar2 + 4);
local_e4 = *(float *)(iVar2 + 8);
local_e0 = *(float *)(iVar2 + 0xc);
}
do {
local_dc = local_e8;
if (fVar5 == 2.8026e-45) {
local_d8 = local_e4 + 25.0;
}
else {
local_d8 = local_e4;
if (fVar5 == 4.2039e-45) {
local_dc = local_e8 - 25.0;
}
else if (fVar5 == 1.4013e-45) {
local_dc = local_e8 + 25.0;
}
else {
local_d8 = local_e4 - 25.0;
}
}
local_d4 = local_e0;
cVar3 = TraceAdjacentNode(0,(Vector *)&local_e8,(Vector *)&local_dc,local_c4,4000.0);
if (((cVar3 != '\0') && (local_8e == '\0')) && (local_8d == '\0')) {
if (300.0 < local_e0 - local_b0) {
LAB_00729740:
*(uint *)(iVar2 + 0x54) = *(uint *)(iVar2 + 0x54) | 0x8000;
break;
}
if (((int)fVar5 - 1U < 2) && (ABS(local_e0 - local_b0) < 18.0)) {
local_c8 = local_b0;
local_cc = local_b4;
local_d0 = local_b8;
if (fVar5 == 2.8026e-45) {
local_cc = local_b4 + 25.0;
}
else {
local_d0 = local_b8 + 25.0;
}
cVar3 = TraceAdjacentNode(0,(Vector *)&local_b8,(Vector *)&local_d0,local_70,4000.0);
if (((cVar3 != '\0') && (local_3a == '\0')) &&
((local_39 == '\0' && (300.0 < local_b0 - local_5c)))) goto LAB_00729740;
}
}
if (pfVar6 == &local_e8) {
fVar5 = fVar1;
if (fVar1 != 5.60519e-45) goto LAB_00729412;
break;
}
fVar4 = *pfVar6;
pfVar6 = pfVar6 + 1;
if (fVar4 != 2.8026e-45) goto LAB_00729444;
LAB_00729560:
local_e8 = *(float *)(iVar2 + 0x10);
local_e4 = *(float *)(iVar2 + 0x14);
local_e0 = *(float *)(iVar2 + 0x18);
} while( true );
}
local_104 = local_104 + 1;
} while (local_104 < DAT_00fe6000);
}
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.