SearchSurroundingAreas<EscapeFlamesScan>
0x0092eb90 · 5572 bytes · __cdecl
_Z22SearchSurroundingAreasI16EscapeFlamesScanEvP8CNavAreaRK6VectorRT_fji
Decompiled
void (6 params)
/* void SearchSurroundingAreas<EscapeFlamesScan>(CNavArea*, Vector const&, EscapeFlamesScan&, float,
unsigned int, int) */
void SearchSurroundingAreas<EscapeFlamesScan>
(CNavArea *param_1,Vector *param_2,EscapeFlamesScan *param_3,float param_4,
uint param_5,int param_6)
{
CNavArea *this;
uint uVar1;
byte bVar2;
char cVar3;
int *piVar4;
int *piVar5;
SurvivorBot *this_00;
int iVar6;
int iVar7;
CNavArea *pCVar8;
int *piVar9;
undefined *puVar10;
int iVar11;
int iVar12;
longdouble lVar13;
longdouble lVar14;
float fVar15;
float fVar16;
float fVar17;
float local_80e0;
float local_80dc;
float local_80d8;
float local_80cc;
int local_80c8;
CNavArea *local_80c4;
float local_80c0;
CNavArea *local_80b0;
undefined4 local_80ac;
CNavArea *local_80a8;
float local_80a4;
CNavArea *local_80a0;
undefined4 local_809c;
int local_8098;
float local_8094;
int local_8090;
undefined4 local_808c;
int local_8088;
float local_8084;
int local_8080;
undefined4 local_807c;
int local_8078;
float local_8074;
int local_8070;
undefined4 local_806c;
int local_8068;
float local_8064;
int local_8060;
undefined4 local_805c;
int local_8058;
float local_8054;
int local_8050;
undefined4 local_804c;
int local_8048;
float local_8044;
int local_8040;
undefined4 local_803c;
undefined4 *local_8038;
undefined4 local_8034;
undefined4 local_8030;
undefined4 local_802c;
undefined4 local_8028 [8192];
int local_28;
undefined4 *local_24;
undefined4 local_20;
if (param_1 != (CNavArea *)0x0) {
iVar11 = CNavArea::m_masterMarker + 1;
CNavArea::m_masterMarker = 1;
if (iVar11 != 0) {
CNavArea::m_masterMarker = iVar11;
}
CNavArea::ClearSearchLists();
local_8038 = local_8028;
local_8034 = 0x1000;
local_8030 = 0xffffffff;
local_802c = 0;
local_28 = 0;
local_20 = 0;
local_24 = local_8038;
if ((*(int *)(param_1 + 0x3c) != CNavArea::m_masterMarker) &&
(CNavArea::m_masterMarker != *(int *)(param_1 + 0x50))) {
*(int *)(param_1 + 0x3c) = CNavArea::m_masterMarker;
*(undefined4 *)(param_1 + 0x78) = 0;
*(undefined4 *)(param_1 + 0x40) = 0;
*(undefined4 *)(param_1 + 0x44) = 0;
local_80b0 = param_1;
local_80ac = 0;
param_1[0x7c] = (CNavArea)((byte)param_1[0x7c] & 0xf0 | 9);
/* try { // try from 0092ec5c to 00930120 has its CatchHandler @ 0093016e */
CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
*)&local_8038,(OpenListInfo_t *)&local_80b0);
*(int *)(param_1 + 0x50) = CNavArea::m_masterMarker;
}
if (param_4 <= 0.0) {
local_80c0 = param_4;
}
else {
local_80c0 = param_4 * 1.5;
param_4 = param_4 * param_4;
}
LAB_0092ecb3:
if (0 < local_28) {
this = (CNavArea *)*local_8038;
CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
::RemoveAtHead((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
*)&local_8038);
if ((((param_5 & 2) != 0) || (cVar3 = CNavArea::IsBlocked(this,param_6,false), cVar3 == '\0'))
&& (*(float *)(this + 0x44) < *(float *)(param_3 + 8) ||
*(float *)(this + 0x44) == *(float *)(param_3 + 8))) {
piVar9 = (int *)0x0;
if (*(int *)param_3 != 0) {
piVar9 = (int *)(*(int *)param_3 + 0x4028);
}
piVar4 = (int *)(**(code **)(*piVar9 + 0xc0))(piVar9);
piVar5 = (int *)(**(code **)(*piVar9 + 200))(piVar9);
iVar11 = (**(code **)(*piVar5 + 0xb8))(piVar5,piVar9);
pCVar8 = *(CNavArea **)(this + 0x78);
cVar3 = (**(code **)(*piVar4 + 0x150))(piVar4,this);
if (cVar3 != '\0') {
iVar6 = *(int *)(this + 0x70);
iVar12 = *(int *)(gpGlobals + 0x18);
if ((iVar6 < iVar12) || (iVar11 != 0)) {
if (pCVar8 != (CNavArea *)0x0) {
lVar13 = (longdouble)CNavArea::GetZDeltaAtEdgeToArea(pCVar8,this);
fVar15 = (float)lVar13;
lVar13 = (longdouble)(**(code **)(*piVar4 + 0x134))(piVar4);
lVar14 = (longdouble)(**(code **)(*piVar4 + 0x130))(piVar4);
if ((float)lVar14 + (float)lVar13 < fVar15) goto LAB_0092ecb3;
lVar13 = (longdouble)(**(code **)(*piVar4 + 0x138))(piVar4);
if ((float)lVar13 < -fVar15) goto LAB_0092ecb3;
lVar13 = (longdouble)(**(code **)(*piVar4 + 0x130))(piVar4);
if (fVar15 <= (float)lVar13) {
lVar13 = (longdouble)(**(code **)(*piVar4 + 0x130))(piVar4);
if (fVar15 < -(float)lVar13) {
lVar13 = (longdouble)(**(code **)(*piVar4 + 0x130))(piVar4);
lVar14 = (longdouble)(**(code **)(*piVar4 + 0x130))(piVar4);
local_80d8 = (-fVar15 - (float)lVar13) / (100.0 - (float)lVar14) + 1.0;
}
else {
local_80d8 = 1.0;
}
}
else {
lVar13 = (longdouble)(**(code **)(*piVar4 + 0x134))();
local_80d8 = (float)(~-(uint)((float)lVar13 < fVar15) & 0x40000000 |
-(uint)((float)lVar13 < fVar15) & 0x42c80000);
}
lVar13 = (longdouble)CNavArea::GetAverageLightIntensity(this);
if (0.4 <= (float)lVar13) {
local_80dc = 1.0;
}
else {
local_80dc = (0.4 - (float)lVar13) * 5.0 + 1.0;
}
local_80c4 = (CNavArea *)0x3f800000;
local_80e0 = 1.0;
if (*(int *)(gpGlobals + 0x18) <= *(int *)(this + 0x70)) {
local_80e0 = 100.0;
}
if (this[0x3a] == (CNavArea)0x0) {
local_80cc = 1.0;
}
else {
fVar15 = (float)(byte)this[0x3a] + 0.0;
if (fVar15 <= 18.0) {
local_80cc = 1.0;
}
else {
lVar13 = (longdouble)(**(code **)(*piVar4 + 0x134))(piVar4);
local_80cc = 100.0;
if (fVar15 < (float)lVar13) {
lVar13 = (longdouble)(**(code **)(*piVar4 + 0x134))(piVar4);
fVar16 = (float)lVar13;
lVar13 = (longdouble)(**(code **)(*piVar4 + 0x130))(piVar4);
fVar17 = (float)lVar13;
if (fVar16 == fVar17) {
local_80cc = (float)(~-(uint)(fVar16 <= fVar15) & 0x41200000 |
-(uint)(fVar16 <= fVar15) & 0x41a00000);
}
else {
local_80cc = ((fVar15 - fVar17) * 10.0) / (fVar16 - fVar17) + 10.0;
}
}
}
}
this_00 = (SurvivorBot *)(**(code **)(*piVar9 + 0xb4))(piVar9);
iVar6 = SurvivorBot::GetTeamSituation(this_00);
iVar11 = *(int *)(iVar6 + 0xc4);
local_80c8 = 0;
if (0 < iVar11) {
do {
uVar1 = *(uint *)(iVar6 + 0x88 + local_80c8 * 4);
piVar4 = (int *)0x0;
if (((uVar1 != 0xffffffff) &&
(puVar10 = g_pEntityList + (uVar1 & 0xfff) * 0x10,
puVar10 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar10 + 8) == uVar1 >> 0xc)) {
piVar4 = *(int **)(puVar10 + 4);
}
cVar3 = (**(code **)(*piVar4 + 0x5a8))(piVar4);
if (cVar3 == '\0') {
uVar1 = *(uint *)(iVar6 + 0x88 + local_80c8 * 4);
if (((uVar1 == 0xffffffff) ||
(puVar10 = g_pEntityList + (uVar1 & 0xfff) * 0x10,
puVar10 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar10 + 8) != uVar1 >> 0xc)) {
bVar2 = (byte)this[0x7e] >> (uRam00002ba0 & 0x1f);
}
else {
bVar2 = (byte)this[0x7e] >> (*(uint *)(*(int *)(puVar10 + 4) + 0x2ba0) & 0x1f)
;
}
if ((bVar2 & 1) != 0) {
iVar11 = *(int *)(iVar6 + 0xc4);
break;
}
}
local_80c8 = local_80c8 + 1;
iVar11 = *(int *)(iVar6 + 0xc4);
} while (local_80c8 < iVar11);
}
if ((iVar11 != 0) && (local_80c4 = (CNavArea *)0x41200000, iVar11 != local_80c8)) {
local_80c4 = (CNavArea *)0x3f800000;
}
if (local_80e0 <= local_80dc) {
local_80e0 = local_80dc;
}
if (local_80e0 <= local_80cc) {
local_80e0 = local_80cc;
}
if ((float)local_80c4 <= local_80e0) {
local_80c4 = (CNavArea *)local_80e0;
}
iVar11 = (**(code **)(*piVar9 + 0xb4))(piVar9);
fVar15 = 0.0;
if (*(int *)(iVar11 + 0x30) != 0) {
fVar15 = (float)(*(int *)(iVar11 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4);
}
lVar13 = (longdouble)
FastCos(((float)(*(uint *)(this + 0x8c) >> 0x10) * 65536.0 +
(float)(*(uint *)(this + 0x8c) & 0xffff)) * fVar15);
if ((((float)lVar13 + 1.0) * 10.0 + (float)local_80c4) * local_80d8 +
*(float *)(pCVar8 + 0x44) < 0.0) goto LAB_0092ecb3;
iVar6 = *(int *)(this + 0x70);
iVar12 = *(int *)(gpGlobals + 0x18);
}
if ((iVar6 < iVar12) &&
(fVar15 = ((float)(byte)this[0x38] * 200.0) /
((*(float *)(this + 0x10) - *(float *)(this + 4)) *
(*(float *)(this + 0x14) - *(float *)(this + 8)) * 0.0004) +
*(float *)(this + 0x44),
fVar15 < *(float *)(param_3 + 8) || fVar15 == *(float *)(param_3 + 8))) {
*(CNavArea **)(param_3 + 4) = this;
*(float *)(param_3 + 8) = fVar15;
}
local_80c4 = this;
do {
piVar9 = *(int **)(local_80c4 + 0x58);
iVar11 = *piVar9;
if (0 < iVar11) {
iVar12 = 0;
iVar6 = iVar11;
do {
if (iVar6 < 1) {
LAB_0092f242:
pCVar8 = (CNavArea *)0x0;
}
else {
iVar7 = 0;
if (iVar12 != 0) {
do {
iVar7 = iVar7 + 1;
if (iVar7 == iVar6) goto LAB_0092f242;
} while (iVar7 != iVar12);
}
pCVar8 = (CNavArea *)piVar9[iVar7 * 2 + 1];
}
if (((((param_5 & 4) == 0) ||
(cVar3 = CNavArea::IsConnected(pCVar8,this,4), cVar3 != '\0')) &&
(pCVar8 != (CNavArea *)0x0)) &&
((*(int *)(pCVar8 + 0x3c) != CNavArea::m_masterMarker &&
(CNavArea::m_masterMarker != *(int *)(pCVar8 + 0x50))))) {
*(int *)(pCVar8 + 0x3c) = CNavArea::m_masterMarker;
*(CNavArea **)(pCVar8 + 0x78) = this;
pCVar8[0x7c] = (CNavArea)((byte)pCVar8[0x7c] & 0xf0 | 9);
if (0.0 < local_80c0) {
fVar15 = *(float *)param_2;
if (*(float *)(pCVar8 + 4) <= fVar15) {
if (fVar15 <= *(float *)(pCVar8 + 0x10)) {
fVar15 = 0.0;
}
else {
fVar15 = fVar15 - *(float *)(pCVar8 + 0x10);
fVar15 = fVar15 * fVar15;
}
}
else {
fVar15 = *(float *)(pCVar8 + 4) - fVar15;
fVar15 = fVar15 * fVar15;
}
fVar16 = *(float *)(param_2 + 4);
if (*(float *)(pCVar8 + 8) <= fVar16) {
if (*(float *)(pCVar8 + 0x14) < fVar16) {
fVar16 = fVar16 - *(float *)(pCVar8 + 0x14);
fVar15 = fVar15 + fVar16 * fVar16;
}
}
else {
fVar16 = *(float *)(pCVar8 + 8) - fVar16;
fVar15 = fVar15 + fVar16 * fVar16;
}
if (fVar15 < param_4) {
fVar15 = SQRT((*(float *)(pCVar8 + 0x30) - *(float *)(this + 0x30)) *
(*(float *)(pCVar8 + 0x30) - *(float *)(this + 0x30)) +
(*(float *)(pCVar8 + 0x2c) - *(float *)(this + 0x2c)) *
(*(float *)(pCVar8 + 0x2c) - *(float *)(this + 0x2c)) +
(*(float *)(pCVar8 + 0x34) - *(float *)(this + 0x34)) *
(*(float *)(pCVar8 + 0x34) - *(float *)(this + 0x34))) +
*(float *)(this + 0x44);
*(float *)(pCVar8 + 0x44) = fVar15;
*(float *)(pCVar8 + 0x40) = fVar15;
if (fVar15 < local_80c0) {
local_80a8 = pCVar8;
local_80a4 = fVar15;
CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
*)&local_8038,(OpenListInfo_t *)&local_80a8);
goto LAB_0092f408;
}
}
}
else {
*(undefined4 *)(pCVar8 + 0x40) = 0;
*(undefined4 *)(pCVar8 + 0x44) = 0;
local_809c = 0;
local_80a0 = pCVar8;
CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
*)&local_8038,(OpenListInfo_t *)&local_80a0);
LAB_0092f408:
*(int *)(pCVar8 + 0x50) = CNavArea::m_masterMarker;
}
}
if (iVar12 + 1 == iVar11) break;
iVar12 = iVar12 + 1;
piVar9 = *(int **)(local_80c4 + 0x58);
iVar6 = *piVar9;
} while( true );
}
local_80c4 = local_80c4 + 4;
} while (local_80c4 != this + 0x10);
local_80c4 = this;
if ((param_5 & 1) != 0) {
do {
iVar11 = 0;
piVar9 = *(int **)(local_80c4 + 0x114);
if (0 < *piVar9) {
do {
iVar6 = piVar9[iVar11 * 2 + 1];
if (((iVar6 != 0) && (*(int *)(iVar6 + 0x3c) != CNavArea::m_masterMarker)) &&
(CNavArea::m_masterMarker != *(int *)(iVar6 + 0x50))) {
*(int *)(iVar6 + 0x3c) = CNavArea::m_masterMarker;
*(CNavArea **)(iVar6 + 0x78) = this;
*(byte *)(iVar6 + 0x7c) = *(byte *)(iVar6 + 0x7c) & 0xf0 | 9;
if (local_80c0 <= 0.0) {
*(undefined4 *)(iVar6 + 0x40) = 0;
*(undefined4 *)(iVar6 + 0x44) = 0;
local_808c = 0;
local_8090 = iVar6;
CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
*)&local_8038,(OpenListInfo_t *)&local_8090);
LAB_0092f602:
*(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
}
else {
fVar15 = *(float *)param_2;
if (fVar15 < *(float *)(iVar6 + 4)) {
fVar15 = *(float *)(iVar6 + 4) - fVar15;
fVar15 = fVar15 * fVar15;
}
else if (fVar15 <= *(float *)(iVar6 + 0x10)) {
fVar15 = 0.0;
}
else {
fVar15 = fVar15 - *(float *)(iVar6 + 0x10);
fVar15 = fVar15 * fVar15;
}
fVar16 = *(float *)(param_2 + 4);
if (*(float *)(iVar6 + 8) <= fVar16) {
if (*(float *)(iVar6 + 0x14) < fVar16) {
fVar16 = fVar16 - *(float *)(iVar6 + 0x14);
fVar15 = fVar15 + fVar16 * fVar16;
}
}
else {
fVar16 = *(float *)(iVar6 + 8) - fVar16;
fVar15 = fVar15 + fVar16 * fVar16;
}
if (fVar15 < param_4) {
fVar15 = *(float *)(iVar6 + 0x2c) - *(float *)(this + 0x2c);
fVar17 = *(float *)(iVar6 + 0x34) - *(float *)(this + 0x34);
fVar16 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
fVar15 = SQRT(fVar15 * fVar15 + fVar17 * fVar17 + fVar16 * fVar16) +
*(float *)(this + 0x44);
*(float *)(iVar6 + 0x44) = fVar15;
*(float *)(iVar6 + 0x40) = fVar15;
if (fVar15 < local_80c0) {
local_8098 = iVar6;
local_8094 = fVar15;
CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
*)&local_8038,(OpenListInfo_t *)&local_8098);
goto LAB_0092f602;
}
}
}
piVar9 = *(int **)(local_80c4 + 0x114);
}
iVar11 = iVar11 + 1;
} while (iVar11 < *piVar9);
}
local_80c4 = local_80c4 + 4;
} while (local_80c4 != this + 0x10);
}
local_80c4 = (CNavArea *)0x0;
piVar9 = *(int **)(this + 0x68);
if (0 < *piVar9) {
do {
iVar11 = piVar9[(int)local_80c4 + 1];
iVar6 = *(int *)(iVar11 + 0x24);
if (((iVar6 != 0) && (*(int *)(iVar6 + 0x3c) != CNavArea::m_masterMarker)) &&
(CNavArea::m_masterMarker != *(int *)(iVar6 + 0x50))) {
*(int *)(iVar6 + 0x3c) = CNavArea::m_masterMarker;
*(CNavArea **)(iVar6 + 0x78) = this;
*(byte *)(iVar6 + 0x7c) = *(byte *)(iVar6 + 0x7c) & 0xf0 | 9;
if (local_80c0 <= 0.0) {
*(undefined4 *)(iVar6 + 0x40) = 0;
*(undefined4 *)(iVar6 + 0x44) = 0;
local_807c = 0;
local_8080 = iVar6;
CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
*)&local_8038,(OpenListInfo_t *)&local_8080);
LAB_0092fac1:
*(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
}
else {
fVar15 = *(float *)param_2;
if (fVar15 < *(float *)(iVar6 + 4)) {
fVar15 = *(float *)(iVar6 + 4) - fVar15;
fVar15 = fVar15 * fVar15;
}
else if (fVar15 <= *(float *)(iVar6 + 0x10)) {
fVar15 = 0.0;
}
else {
fVar15 = fVar15 - *(float *)(iVar6 + 0x10);
fVar15 = fVar15 * fVar15;
}
fVar16 = *(float *)(param_2 + 4);
if (*(float *)(iVar6 + 8) <= fVar16) {
if (*(float *)(iVar6 + 0x14) < fVar16) {
fVar16 = fVar16 - *(float *)(iVar6 + 0x14);
fVar15 = fVar15 + fVar16 * fVar16;
}
}
else {
fVar16 = *(float *)(iVar6 + 8) - fVar16;
fVar15 = fVar15 + fVar16 * fVar16;
}
if (fVar15 < param_4) {
fVar15 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
fVar17 = *(float *)(iVar6 + 0x34) - *(float *)(this + 0x34);
fVar16 = *(float *)(iVar6 + 0x2c) - *(float *)(this + 0x2c);
fVar15 = SQRT(fVar15 * fVar15 + fVar17 * fVar17 + fVar16 * fVar16) +
*(float *)(this + 0x44);
*(float *)(iVar6 + 0x44) = fVar15;
*(float *)(iVar6 + 0x40) = fVar15;
if (fVar15 < local_80c0) {
local_8088 = iVar6;
local_8084 = fVar15;
CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
*)&local_8038,(OpenListInfo_t *)&local_8088);
goto LAB_0092fac1;
}
}
}
}
iVar6 = *(int *)(iVar11 + 0x28);
if (((iVar6 != 0) && (*(int *)(iVar6 + 0x3c) != CNavArea::m_masterMarker)) &&
(CNavArea::m_masterMarker != *(int *)(iVar6 + 0x50))) {
*(int *)(iVar6 + 0x3c) = CNavArea::m_masterMarker;
*(CNavArea **)(iVar6 + 0x78) = this;
*(byte *)(iVar6 + 0x7c) = *(byte *)(iVar6 + 0x7c) & 0xf0 | 9;
if (local_80c0 <= 0.0) {
*(undefined4 *)(iVar6 + 0x40) = 0;
*(undefined4 *)(iVar6 + 0x44) = 0;
local_806c = 0;
local_8070 = iVar6;
CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
*)&local_8038,(OpenListInfo_t *)&local_8070);
LAB_0092fa7e:
*(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
}
else {
fVar15 = *(float *)param_2;
if (*(float *)(iVar6 + 4) <= fVar15) {
if (fVar15 <= *(float *)(iVar6 + 0x10)) {
fVar15 = 0.0;
}
else {
fVar15 = fVar15 - *(float *)(iVar6 + 0x10);
fVar15 = fVar15 * fVar15;
}
}
else {
fVar15 = *(float *)(iVar6 + 4) - fVar15;
fVar15 = fVar15 * fVar15;
}
fVar16 = *(float *)(param_2 + 4);
if (*(float *)(iVar6 + 8) <= fVar16) {
if (*(float *)(iVar6 + 0x14) < fVar16) {
fVar16 = fVar16 - *(float *)(iVar6 + 0x14);
fVar15 = fVar15 + fVar16 * fVar16;
}
}
else {
fVar16 = *(float *)(iVar6 + 8) - fVar16;
fVar15 = fVar15 + fVar16 * fVar16;
}
if (fVar15 < param_4) {
fVar17 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
fVar15 = *(float *)(iVar6 + 0x34) - *(float *)(this + 0x34);
fVar16 = *(float *)(iVar6 + 0x2c) - *(float *)(this + 0x2c);
fVar15 = SQRT(fVar15 * fVar15 + fVar17 * fVar17 + fVar16 * fVar16) +
*(float *)(this + 0x44);
*(float *)(iVar6 + 0x44) = fVar15;
*(float *)(iVar6 + 0x40) = fVar15;
if (fVar15 < local_80c0) {
local_8078 = iVar6;
local_8074 = fVar15;
CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
*)&local_8038,(OpenListInfo_t *)&local_8078);
goto LAB_0092fa7e;
}
}
}
}
iVar11 = *(int *)(iVar11 + 0x2c);
if (((iVar11 != 0) && (*(int *)(iVar11 + 0x3c) != CNavArea::m_masterMarker)) &&
(CNavArea::m_masterMarker != *(int *)(iVar11 + 0x50))) {
*(int *)(iVar11 + 0x3c) = CNavArea::m_masterMarker;
*(CNavArea **)(iVar11 + 0x78) = this;
*(byte *)(iVar11 + 0x7c) = *(byte *)(iVar11 + 0x7c) & 0xf0 | 9;
if (local_80c0 <= 0.0) {
*(undefined4 *)(iVar11 + 0x40) = 0;
*(undefined4 *)(iVar11 + 0x44) = 0;
local_805c = 0;
local_8060 = iVar11;
CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
*)&local_8038,(OpenListInfo_t *)&local_8060);
LAB_0092fa3b:
*(int *)(iVar11 + 0x50) = CNavArea::m_masterMarker;
}
else {
fVar15 = *(float *)param_2;
if (*(float *)(iVar11 + 4) <= fVar15) {
if (fVar15 <= *(float *)(iVar11 + 0x10)) {
fVar15 = 0.0;
}
else {
fVar15 = fVar15 - *(float *)(iVar11 + 0x10);
fVar15 = fVar15 * fVar15;
}
}
else {
fVar15 = *(float *)(iVar11 + 4) - fVar15;
fVar15 = fVar15 * fVar15;
}
fVar16 = *(float *)(param_2 + 4);
if (*(float *)(iVar11 + 8) <= fVar16) {
if (*(float *)(iVar11 + 0x14) < fVar16) {
fVar16 = fVar16 - *(float *)(iVar11 + 0x14);
fVar15 = fVar15 + fVar16 * fVar16;
}
}
else {
fVar16 = *(float *)(iVar11 + 8) - fVar16;
fVar15 = fVar15 + fVar16 * fVar16;
}
if (fVar15 < param_4) {
fVar15 = *(float *)(iVar11 + 0x2c) - *(float *)(this + 0x2c);
fVar17 = *(float *)(iVar11 + 0x34) - *(float *)(this + 0x34);
fVar16 = *(float *)(iVar11 + 0x30) - *(float *)(this + 0x30);
fVar15 = SQRT(fVar15 * fVar15 + fVar17 * fVar17 + fVar16 * fVar16) +
*(float *)(this + 0x44);
*(float *)(iVar11 + 0x44) = fVar15;
*(float *)(iVar11 + 0x40) = fVar15;
if (fVar15 < local_80c0) {
local_8068 = iVar11;
local_8064 = fVar15;
CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
*)&local_8038,(OpenListInfo_t *)&local_8068);
goto LAB_0092fa3b;
}
}
}
}
local_80c4 = (CNavArea *)((int)local_80c4 + 1);
piVar9 = *(int **)(this + 0x68);
} while ((int)local_80c4 < *piVar9);
}
piVar9 = *(int **)(this + 0x6c);
iVar11 = 0;
if (0 < *piVar9) {
do {
iVar6 = *(int *)(piVar9[iVar11 + 1] + 0x34);
if (((iVar6 != 0) && (*(int *)(iVar6 + 0x3c) != CNavArea::m_masterMarker)) &&
(CNavArea::m_masterMarker != *(int *)(iVar6 + 0x50))) {
*(int *)(iVar6 + 0x3c) = CNavArea::m_masterMarker;
*(CNavArea **)(iVar6 + 0x78) = this;
*(byte *)(iVar6 + 0x7c) = *(byte *)(iVar6 + 0x7c) & 0xf0 | 9;
if (local_80c0 <= 0.0) {
*(undefined4 *)(iVar6 + 0x40) = 0;
*(undefined4 *)(iVar6 + 0x44) = 0;
local_804c = 0;
local_8050 = iVar6;
CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
*)&local_8038,(OpenListInfo_t *)&local_8050);
LAB_0092fcf5:
*(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
}
else {
fVar15 = *(float *)param_2;
if (fVar15 < *(float *)(iVar6 + 4)) {
fVar15 = *(float *)(iVar6 + 4) - fVar15;
fVar15 = fVar15 * fVar15;
}
else if (fVar15 <= *(float *)(iVar6 + 0x10)) {
fVar15 = 0.0;
}
else {
fVar15 = fVar15 - *(float *)(iVar6 + 0x10);
fVar15 = fVar15 * fVar15;
}
fVar16 = *(float *)(param_2 + 4);
if (*(float *)(iVar6 + 8) <= fVar16) {
if (*(float *)(iVar6 + 0x14) < fVar16) {
fVar16 = fVar16 - *(float *)(iVar6 + 0x14);
fVar15 = fVar15 + fVar16 * fVar16;
}
}
else {
fVar16 = *(float *)(iVar6 + 8) - fVar16;
fVar15 = fVar15 + fVar16 * fVar16;
}
if (fVar15 < param_4) {
fVar15 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
fVar17 = *(float *)(iVar6 + 0x34) - *(float *)(this + 0x34);
fVar16 = *(float *)(iVar6 + 0x2c) - *(float *)(this + 0x2c);
fVar15 = SQRT(fVar15 * fVar15 + fVar17 * fVar17 + fVar16 * fVar16) +
*(float *)(this + 0x44);
*(float *)(iVar6 + 0x44) = fVar15;
*(float *)(iVar6 + 0x40) = fVar15;
if (fVar15 < local_80c0) {
local_8058 = iVar6;
local_8054 = fVar15;
CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
*)&local_8038,(OpenListInfo_t *)&local_8058);
goto LAB_0092fcf5;
}
}
}
piVar9 = *(int **)(this + 0x6c);
}
iVar11 = iVar11 + 1;
} while (iVar11 < *piVar9);
}
if ((param_5 & 8) == 0) {
if ((CNavArea::GetElevatorAreas()::empty == '\0') &&
(iVar11 = __cxa_guard_acquire(&CNavArea::GetElevatorAreas()::empty), iVar11 != 0))
{
if ((CUtlVectorUltraConservative<NavConnect,CUtlVectorUltraConservativeAllocator>::
StaticData()::staticData == '\0') &&
(iVar11 = __cxa_guard_acquire(&CUtlVectorUltraConservative<NavConnect,CUtlVectorUltraConservativeAllocator>
::StaticData()::staticData), iVar11 != 0)) {
__cxa_guard_release(&CUtlVectorUltraConservative<NavConnect,CUtlVectorUltraConservativeAllocator>
::StaticData()::staticData);
}
CNavArea::GetElevatorAreas()::empty =
&CUtlVectorUltraConservative<NavConnect,CUtlVectorUltraConservativeAllocator>::
StaticData()::staticData;
__cxa_guard_release(&CNavArea::GetElevatorAreas()::empty);
__cxa_atexit(CUtlVectorUltraConservative<NavConnect,CUtlVectorUltraConservativeAllocator>
::~CUtlVectorUltraConservative,&CNavArea::GetElevatorAreas()::empty,
&__dso_handle);
}
pCVar8 = this + 0x88;
if (((byte)this[0x57] & 0x40) == 0) {
pCVar8 = (CNavArea *)&CNavArea::GetElevatorAreas()::empty;
}
piVar9 = *(int **)pCVar8;
if (0 < *piVar9) {
iVar11 = 0;
do {
iVar6 = piVar9[iVar11 * 2 + 1];
if (((iVar6 != 0) && (*(int *)(iVar6 + 0x3c) != CNavArea::m_masterMarker)) &&
(CNavArea::m_masterMarker != *(int *)(iVar6 + 0x50))) {
*(int *)(iVar6 + 0x3c) = CNavArea::m_masterMarker;
*(CNavArea **)(iVar6 + 0x78) = this;
*(byte *)(iVar6 + 0x7c) = *(byte *)(iVar6 + 0x7c) & 0xf0 | 9;
if (local_80c0 <= 0.0) {
*(undefined4 *)(iVar6 + 0x40) = 0;
*(undefined4 *)(iVar6 + 0x44) = 0;
local_803c = 0;
local_8040 = iVar6;
CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
*)&local_8038,(OpenListInfo_t *)&local_8040);
LAB_0092fede:
*(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
}
else {
fVar15 = *(float *)param_2;
if (fVar15 < *(float *)(iVar6 + 4)) {
fVar15 = *(float *)(iVar6 + 4) - fVar15;
fVar15 = fVar15 * fVar15;
}
else if (fVar15 <= *(float *)(iVar6 + 0x10)) {
fVar15 = 0.0;
}
else {
fVar15 = fVar15 - *(float *)(iVar6 + 0x10);
fVar15 = fVar15 * fVar15;
}
fVar16 = *(float *)(param_2 + 4);
if (*(float *)(iVar6 + 8) <= fVar16) {
if (*(float *)(iVar6 + 0x14) < fVar16) {
fVar16 = fVar16 - *(float *)(iVar6 + 0x14);
fVar15 = fVar15 + fVar16 * fVar16;
}
}
else {
fVar16 = *(float *)(iVar6 + 8) - fVar16;
fVar15 = fVar15 + fVar16 * fVar16;
}
if (fVar15 < param_4) {
fVar17 = *(float *)(iVar6 + 0x2c) - *(float *)(this + 0x2c);
fVar15 = *(float *)(iVar6 + 0x34) - *(float *)(this + 0x34);
fVar16 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
fVar15 = SQRT(fVar15 * fVar15 + fVar17 * fVar17 + fVar16 * fVar16) +
*(float *)(this + 0x44);
*(float *)(iVar6 + 0x44) = fVar15;
*(float *)(iVar6 + 0x40) = fVar15;
if (fVar15 < local_80c0) {
local_8048 = iVar6;
local_8044 = fVar15;
CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
*)&local_8038,(OpenListInfo_t *)&local_8048);
goto LAB_0092fede;
}
}
}
piVar9 = *(int **)pCVar8;
}
iVar11 = iVar11 + 1;
} while (iVar11 < *piVar9);
}
}
}
}
}
goto LAB_0092ecb3;
}
local_28 = 0;
CUtlMemory<OpenListInfo_t,int>::Purge((CUtlMemory<OpenListInfo_t,int> *)&local_8038);
local_24 = local_8038;
CUtlMemory<OpenListInfo_t,int>::Purge((CUtlMemory<OpenListInfo_t,int> *)&local_8038);
}
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.