SearchSurroundingAreas<WitchSafeScan>
0x00a42970 · 5067 bytes · __cdecl
_Z22SearchSurroundingAreasI13WitchSafeScanEvP8CNavAreaRK6VectorRT_fji
Decompiled
void (6 params)
/* void SearchSurroundingAreas<WitchSafeScan>(CNavArea*, Vector const&, WitchSafeScan&, float,
unsigned int, int) */
void SearchSurroundingAreas<WitchSafeScan>
(CNavArea *param_1,Vector *param_2,WitchSafeScan *param_3,float param_4,uint param_5,
int param_6)
{
float fVar1;
CNavArea *this;
char cVar2;
float *pfVar3;
int *piVar4;
CBaseEntity *this_00;
CBaseEntity *pCVar5;
uint uVar6;
int iVar7;
CNavArea *pCVar8;
int *piVar9;
int iVar10;
int iVar11;
int iVar12;
longdouble lVar13;
float fVar14;
float fVar15;
float fVar16;
float fVar17;
float fVar18;
float local_80e0;
int local_80d8;
CNavArea *local_80d4;
float local_80d0;
float local_80cc;
CNavArea *local_80c8;
undefined4 local_80c4;
CNavArea *local_80c0;
float local_80bc;
CNavArea *local_80b8;
undefined4 local_80b4;
int local_80b0;
float local_80ac;
int local_80a8;
undefined4 local_80a4;
int local_80a0;
float local_809c;
int local_8098;
undefined4 local_8094;
int local_8090;
float local_808c;
int local_8088;
undefined4 local_8084;
int local_8080;
float local_807c;
int local_8078;
undefined4 local_8074;
int local_8070;
float local_806c;
int local_8068;
undefined4 local_8064;
int local_8060;
float local_805c;
int local_8058;
undefined4 local_8054;
undefined4 local_8050;
undefined4 local_804c;
float local_8048;
undefined4 local_8044;
undefined4 local_8040;
float 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) {
return;
}
iVar10 = CNavArea::m_masterMarker + 1;
CNavArea::m_masterMarker = 1;
if (iVar10 != 0) {
CNavArea::m_masterMarker = iVar10;
}
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_80c8 = param_1;
local_80c4 = 0;
param_1[0x7c] = (CNavArea)((byte)param_1[0x7c] & 0xf0 | 9);
/* try { // try from 00a42a3c to 00a43cca has its CatchHandler @ 00a43d4f */
CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
*)&local_8038,(OpenListInfo_t *)&local_80c8);
*(int *)(param_1 + 0x50) = CNavArea::m_masterMarker;
}
if (param_4 <= 0.0) {
local_80d0 = param_4;
}
else {
local_80d0 = param_4 * 1.5;
param_4 = param_4 * param_4;
}
do {
while( true ) {
do {
if (local_28 < 1) {
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;
}
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);
} while (((param_5 & 2) == 0) &&
(cVar2 = CNavArea::IsBlocked(this,param_6,false), cVar2 != '\0'));
local_8044 = *(undefined4 *)(this + 0x2c);
pCVar8 = *(CNavArea **)(this + 0x78);
local_8040 = *(undefined4 *)(this + 0x30);
local_803c = *(float *)(this + 0x34) + 40.0;
cVar2 = CDirectorTacticalServices::IsVisibleToTeam
(*(CDirectorTacticalServices **)(TheDirector + 0x628),(Vector *)&local_8044,
2,0,0.0,(TerrorNavArea *)0x0,(CBaseEntity *)0x0);
iVar10 = 0;
if (cVar2 == '\0') break;
LAB_00a42ef8:
local_80d4 = this;
do {
piVar9 = *(int **)(local_80d4 + 0x58);
iVar10 = *piVar9;
if (0 < iVar10) {
iVar12 = 0;
iVar11 = iVar10;
do {
if (iVar11 < 1) {
LAB_00a42f52:
pCVar8 = (CNavArea *)0x0;
}
else {
iVar7 = 0;
if (iVar12 != 0) {
do {
iVar7 = iVar7 + 1;
if (iVar7 == iVar11) goto LAB_00a42f52;
} while (iVar7 != iVar12);
}
pCVar8 = (CNavArea *)piVar9[iVar7 * 2 + 1];
}
if (((((param_5 & 4) == 0) ||
(cVar2 = CNavArea::IsConnected(pCVar8,this,4), cVar2 != '\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_80d0) {
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;
}
fVar17 = *(float *)(param_2 + 4);
if (*(float *)(pCVar8 + 8) <= fVar17) {
if (*(float *)(pCVar8 + 0x14) < fVar17) {
fVar17 = fVar17 - *(float *)(pCVar8 + 0x14);
fVar15 = fVar15 + fVar17 * fVar17;
}
}
else {
fVar17 = *(float *)(pCVar8 + 8) - fVar17;
fVar15 = fVar15 + fVar17 * fVar17;
}
if (fVar15 < param_4) {
fVar15 = SQRT((*(float *)(pCVar8 + 0x30) - *(float *)(this + 0x30)) *
(*(float *)(pCVar8 + 0x30) - *(float *)(this + 0x30)) +
(*(float *)(pCVar8 + 0x34) - *(float *)(this + 0x34)) *
(*(float *)(pCVar8 + 0x34) - *(float *)(this + 0x34)) +
(*(float *)(pCVar8 + 0x2c) - *(float *)(this + 0x2c)) *
(*(float *)(pCVar8 + 0x2c) - *(float *)(this + 0x2c))) +
*(float *)(this + 0x44);
*(float *)(pCVar8 + 0x44) = fVar15;
*(float *)(pCVar8 + 0x40) = fVar15;
if (fVar15 < local_80d0) {
local_80c0 = pCVar8;
local_80bc = 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_80c0);
goto LAB_00a43118;
}
}
}
else {
*(undefined4 *)(pCVar8 + 0x40) = 0;
*(undefined4 *)(pCVar8 + 0x44) = 0;
local_80b4 = 0;
local_80b8 = 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_80b8);
LAB_00a43118:
*(int *)(pCVar8 + 0x50) = CNavArea::m_masterMarker;
}
}
if (iVar12 + 1 == iVar10) break;
iVar12 = iVar12 + 1;
piVar9 = *(int **)(local_80d4 + 0x58);
iVar11 = *piVar9;
} while( true );
}
local_80d4 = local_80d4 + 4;
} while (local_80d4 != this + 0x10);
local_80d4 = this;
if ((param_5 & 1) != 0) {
do {
iVar10 = 0;
piVar9 = *(int **)(local_80d4 + 0x114);
if (0 < *piVar9) {
do {
iVar11 = piVar9[iVar10 * 2 + 1];
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_80d0 <= 0.0) {
*(undefined4 *)(iVar11 + 0x40) = 0;
*(undefined4 *)(iVar11 + 0x44) = 0;
local_80a4 = 0;
local_80a8 = 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_80a8);
LAB_00a43312:
*(int *)(iVar11 + 0x50) = CNavArea::m_masterMarker;
}
else {
fVar15 = *(float *)param_2;
if (fVar15 < *(float *)(iVar11 + 4)) {
fVar15 = *(float *)(iVar11 + 4) - fVar15;
fVar15 = fVar15 * fVar15;
}
else if (fVar15 <= *(float *)(iVar11 + 0x10)) {
fVar15 = 0.0;
}
else {
fVar15 = fVar15 - *(float *)(iVar11 + 0x10);
fVar15 = fVar15 * fVar15;
}
fVar17 = *(float *)(param_2 + 4);
if (*(float *)(iVar11 + 8) <= fVar17) {
if (*(float *)(iVar11 + 0x14) < fVar17) {
fVar17 = fVar17 - *(float *)(iVar11 + 0x14);
fVar15 = fVar15 + fVar17 * fVar17;
}
}
else {
fVar17 = *(float *)(iVar11 + 8) - fVar17;
fVar15 = fVar15 + fVar17 * fVar17;
}
if (fVar15 < param_4) {
fVar18 = *(float *)(iVar11 + 0x2c) - *(float *)(this + 0x2c);
fVar15 = *(float *)(iVar11 + 0x30) - *(float *)(this + 0x30);
fVar17 = *(float *)(iVar11 + 0x34) - *(float *)(this + 0x34);
fVar15 = SQRT(fVar15 * fVar15 + fVar18 * fVar18 + fVar17 * fVar17) +
*(float *)(this + 0x44);
*(float *)(iVar11 + 0x44) = fVar15;
*(float *)(iVar11 + 0x40) = fVar15;
if (fVar15 < local_80d0) {
local_80b0 = iVar11;
local_80ac = 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_80b0);
goto LAB_00a43312;
}
}
}
piVar9 = *(int **)(local_80d4 + 0x114);
}
iVar10 = iVar10 + 1;
} while (iVar10 < *piVar9);
}
local_80d4 = local_80d4 + 4;
} while (local_80d4 != this + 0x10);
}
local_80d4 = (CNavArea *)0x0;
piVar9 = *(int **)(this + 0x68);
if (0 < *piVar9) {
do {
iVar10 = piVar9[(int)local_80d4 + 1];
iVar11 = *(int *)(iVar10 + 0x24);
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_80d0 <= 0.0) {
*(undefined4 *)(iVar11 + 0x40) = 0;
*(undefined4 *)(iVar11 + 0x44) = 0;
local_8094 = 0;
local_8098 = 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_8098);
LAB_00a437d1:
*(int *)(iVar11 + 0x50) = CNavArea::m_masterMarker;
}
else {
fVar15 = *(float *)param_2;
if (fVar15 < *(float *)(iVar11 + 4)) {
fVar15 = *(float *)(iVar11 + 4) - fVar15;
fVar15 = fVar15 * fVar15;
}
else if (fVar15 <= *(float *)(iVar11 + 0x10)) {
fVar15 = 0.0;
}
else {
fVar15 = fVar15 - *(float *)(iVar11 + 0x10);
fVar15 = fVar15 * fVar15;
}
fVar17 = *(float *)(param_2 + 4);
if (*(float *)(iVar11 + 8) <= fVar17) {
if (*(float *)(iVar11 + 0x14) < fVar17) {
fVar17 = fVar17 - *(float *)(iVar11 + 0x14);
fVar15 = fVar15 + fVar17 * fVar17;
}
}
else {
fVar17 = *(float *)(iVar11 + 8) - fVar17;
fVar15 = fVar15 + fVar17 * fVar17;
}
if (fVar15 < param_4) {
fVar18 = *(float *)(iVar11 + 0x2c) - *(float *)(this + 0x2c);
fVar15 = *(float *)(iVar11 + 0x34) - *(float *)(this + 0x34);
fVar17 = *(float *)(iVar11 + 0x30) - *(float *)(this + 0x30);
fVar15 = SQRT(fVar15 * fVar15 + fVar18 * fVar18 + fVar17 * fVar17) +
*(float *)(this + 0x44);
*(float *)(iVar11 + 0x44) = fVar15;
*(float *)(iVar11 + 0x40) = fVar15;
if (fVar15 < local_80d0) {
local_80a0 = iVar11;
local_809c = 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_80a0);
goto LAB_00a437d1;
}
}
}
}
iVar11 = *(int *)(iVar10 + 0x28);
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_80d0 <= 0.0) {
*(undefined4 *)(iVar11 + 0x40) = 0;
*(undefined4 *)(iVar11 + 0x44) = 0;
local_8084 = 0;
local_8088 = 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_8088);
LAB_00a4378e:
*(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;
}
fVar17 = *(float *)(param_2 + 4);
if (*(float *)(iVar11 + 8) <= fVar17) {
if (*(float *)(iVar11 + 0x14) < fVar17) {
fVar17 = fVar17 - *(float *)(iVar11 + 0x14);
fVar15 = fVar15 + fVar17 * fVar17;
}
}
else {
fVar17 = *(float *)(iVar11 + 8) - fVar17;
fVar15 = fVar15 + fVar17 * fVar17;
}
if (fVar15 < param_4) {
fVar15 = *(float *)(iVar11 + 0x2c) - *(float *)(this + 0x2c);
fVar18 = *(float *)(iVar11 + 0x34) - *(float *)(this + 0x34);
fVar17 = *(float *)(iVar11 + 0x30) - *(float *)(this + 0x30);
fVar15 = SQRT(fVar15 * fVar15 + fVar18 * fVar18 + fVar17 * fVar17) +
*(float *)(this + 0x44);
*(float *)(iVar11 + 0x44) = fVar15;
*(float *)(iVar11 + 0x40) = fVar15;
if (fVar15 < local_80d0) {
local_8090 = iVar11;
local_808c = 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_8090);
goto LAB_00a4378e;
}
}
}
}
iVar10 = *(int *)(iVar10 + 0x2c);
if (((iVar10 != 0) && (*(int *)(iVar10 + 0x3c) != CNavArea::m_masterMarker)) &&
(CNavArea::m_masterMarker != *(int *)(iVar10 + 0x50))) {
*(int *)(iVar10 + 0x3c) = CNavArea::m_masterMarker;
*(CNavArea **)(iVar10 + 0x78) = this;
*(byte *)(iVar10 + 0x7c) = *(byte *)(iVar10 + 0x7c) & 0xf0 | 9;
if (local_80d0 <= 0.0) {
*(undefined4 *)(iVar10 + 0x40) = 0;
*(undefined4 *)(iVar10 + 0x44) = 0;
local_8074 = 0;
local_8078 = iVar10;
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);
LAB_00a4374b:
*(int *)(iVar10 + 0x50) = CNavArea::m_masterMarker;
}
else {
fVar15 = *(float *)param_2;
if (*(float *)(iVar10 + 4) <= fVar15) {
if (fVar15 <= *(float *)(iVar10 + 0x10)) {
fVar15 = 0.0;
}
else {
fVar15 = fVar15 - *(float *)(iVar10 + 0x10);
fVar15 = fVar15 * fVar15;
}
}
else {
fVar15 = *(float *)(iVar10 + 4) - fVar15;
fVar15 = fVar15 * fVar15;
}
fVar17 = *(float *)(param_2 + 4);
if (*(float *)(iVar10 + 8) <= fVar17) {
if (*(float *)(iVar10 + 0x14) < fVar17) {
fVar17 = fVar17 - *(float *)(iVar10 + 0x14);
fVar15 = fVar15 + fVar17 * fVar17;
}
}
else {
fVar17 = *(float *)(iVar10 + 8) - fVar17;
fVar15 = fVar15 + fVar17 * fVar17;
}
if (fVar15 < param_4) {
fVar15 = *(float *)(iVar10 + 0x30) - *(float *)(this + 0x30);
fVar18 = *(float *)(iVar10 + 0x34) - *(float *)(this + 0x34);
fVar17 = *(float *)(iVar10 + 0x2c) - *(float *)(this + 0x2c);
fVar15 = SQRT(fVar15 * fVar15 + fVar18 * fVar18 + fVar17 * fVar17) +
*(float *)(this + 0x44);
*(float *)(iVar10 + 0x44) = fVar15;
*(float *)(iVar10 + 0x40) = fVar15;
if (fVar15 < local_80d0) {
local_8080 = iVar10;
local_807c = 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_8080);
goto LAB_00a4374b;
}
}
}
}
local_80d4 = (CNavArea *)((int)local_80d4 + 1);
piVar9 = *(int **)(this + 0x68);
} while ((int)local_80d4 < *piVar9);
}
piVar9 = *(int **)(this + 0x6c);
iVar10 = 0;
if (0 < *piVar9) {
do {
iVar11 = *(int *)(piVar9[iVar10 + 1] + 0x34);
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_80d0 <= 0.0) {
*(undefined4 *)(iVar11 + 0x40) = 0;
*(undefined4 *)(iVar11 + 0x44) = 0;
local_8064 = 0;
local_8068 = 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_8068);
LAB_00a43a45:
*(int *)(iVar11 + 0x50) = CNavArea::m_masterMarker;
}
else {
fVar15 = *(float *)param_2;
if (fVar15 < *(float *)(iVar11 + 4)) {
fVar15 = *(float *)(iVar11 + 4) - fVar15;
fVar15 = fVar15 * fVar15;
}
else if (fVar15 <= *(float *)(iVar11 + 0x10)) {
fVar15 = 0.0;
}
else {
fVar15 = fVar15 - *(float *)(iVar11 + 0x10);
fVar15 = fVar15 * fVar15;
}
fVar17 = *(float *)(param_2 + 4);
if (*(float *)(iVar11 + 8) <= fVar17) {
if (*(float *)(iVar11 + 0x14) < fVar17) {
fVar17 = fVar17 - *(float *)(iVar11 + 0x14);
fVar15 = fVar15 + fVar17 * fVar17;
}
}
else {
fVar17 = *(float *)(iVar11 + 8) - fVar17;
fVar15 = fVar15 + fVar17 * fVar17;
}
if (fVar15 < param_4) {
fVar15 = *(float *)(iVar11 + 0x2c) - *(float *)(this + 0x2c);
fVar18 = *(float *)(iVar11 + 0x34) - *(float *)(this + 0x34);
fVar17 = *(float *)(iVar11 + 0x30) - *(float *)(this + 0x30);
fVar15 = SQRT(fVar15 * fVar15 + fVar18 * fVar18 + fVar17 * fVar17) +
*(float *)(this + 0x44);
*(float *)(iVar11 + 0x44) = fVar15;
*(float *)(iVar11 + 0x40) = fVar15;
if (fVar15 < local_80d0) {
local_8070 = iVar11;
local_806c = 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_8070);
goto LAB_00a43a45;
}
}
}
piVar9 = *(int **)(this + 0x6c);
}
iVar10 = iVar10 + 1;
} while (iVar10 < *piVar9);
}
if ((param_5 & 8) == 0) {
if ((CNavArea::GetElevatorAreas()::empty == '\0') &&
(iVar10 = __cxa_guard_acquire(&CNavArea::GetElevatorAreas()::empty), iVar10 != 0)) {
if ((CUtlVectorUltraConservative<NavConnect,CUtlVectorUltraConservativeAllocator>::
StaticData()::staticData == '\0') &&
(iVar10 = __cxa_guard_acquire(&CUtlVectorUltraConservative<NavConnect,CUtlVectorUltraConservativeAllocator>
::StaticData()::staticData), iVar10 != 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) {
iVar10 = 0;
do {
iVar11 = piVar9[iVar10 * 2 + 1];
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_80d0 <= 0.0) {
*(undefined4 *)(iVar11 + 0x40) = 0;
*(undefined4 *)(iVar11 + 0x44) = 0;
local_8054 = 0;
local_8058 = 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_8058);
LAB_00a43c2e:
*(int *)(iVar11 + 0x50) = CNavArea::m_masterMarker;
}
else {
fVar15 = *(float *)param_2;
if (fVar15 < *(float *)(iVar11 + 4)) {
fVar15 = *(float *)(iVar11 + 4) - fVar15;
fVar15 = fVar15 * fVar15;
}
else if (fVar15 <= *(float *)(iVar11 + 0x10)) {
fVar15 = 0.0;
}
else {
fVar15 = fVar15 - *(float *)(iVar11 + 0x10);
fVar15 = fVar15 * fVar15;
}
fVar17 = *(float *)(param_2 + 4);
if (*(float *)(iVar11 + 8) <= fVar17) {
if (*(float *)(iVar11 + 0x14) < fVar17) {
fVar17 = fVar17 - *(float *)(iVar11 + 0x14);
fVar15 = fVar15 + fVar17 * fVar17;
}
}
else {
fVar17 = *(float *)(iVar11 + 8) - fVar17;
fVar15 = fVar15 + fVar17 * fVar17;
}
if (fVar15 < param_4) {
fVar15 = *(float *)(iVar11 + 0x2c) - *(float *)(this + 0x2c);
fVar18 = *(float *)(iVar11 + 0x30) - *(float *)(this + 0x30);
fVar17 = *(float *)(iVar11 + 0x34) - *(float *)(this + 0x34);
fVar15 = SQRT(fVar15 * fVar15 + fVar18 * fVar18 + fVar17 * fVar17) +
*(float *)(this + 0x44);
*(float *)(iVar11 + 0x44) = fVar15;
*(float *)(iVar11 + 0x40) = fVar15;
if (fVar15 < local_80d0) {
local_8060 = iVar11;
local_805c = 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_8060);
goto LAB_00a43c2e;
}
}
}
piVar9 = *(int **)pCVar8;
}
iVar10 = iVar10 + 1;
} while (iVar10 < *piVar9);
}
}
}
do {
if (iVar10 == 2) {
local_8050 = *(undefined4 *)(this + 0x10);
local_804c = *(undefined4 *)(this + 0x14);
local_8048 = *(float *)(this + 0x18);
}
else if (iVar10 == 3) {
local_8048 = *(float *)(this + 0x28);
local_804c = *(undefined4 *)(this + 0x14);
local_8050 = *(undefined4 *)(this + 4);
}
else if (iVar10 == 1) {
local_8048 = *(float *)(this + 0x24);
local_804c = *(undefined4 *)(this + 8);
local_8050 = *(undefined4 *)(this + 0x10);
}
else {
local_8050 = *(undefined4 *)(this + 4);
local_804c = *(undefined4 *)(this + 8);
local_8048 = *(float *)(this + 0xc);
}
local_8048 = local_8048 + 40.0;
cVar2 = CDirectorTacticalServices::IsVisibleToTeam
(*(CDirectorTacticalServices **)(TheDirector + 0x628),(Vector *)&local_8050,
2,0,0.0,(TerrorNavArea *)0x0,(CBaseEntity *)0x0);
if (cVar2 != '\0') goto LAB_00a42ef8;
iVar10 = iVar10 + 1;
} while (iVar10 != 4);
fVar15 = *(float *)(WitchMinRetreatRange._28_4_ + 0x2c);
pfVar3 = (float *)(**(code **)(*(int *)(*(int *)param_3 + 0x1a3c) + 0xd4))
(*(int *)param_3 + 0x1a3c);
if ((pfVar3[1] - *(float *)(this + 0x30)) * (pfVar3[1] - *(float *)(this + 0x30)) +
(*pfVar3 - *(float *)(this + 0x2c)) * (*pfVar3 - *(float *)(this + 0x2c)) +
(pfVar3[2] - *(float *)(this + 0x34)) * (pfVar3[2] - *(float *)(this + 0x34)) <
fVar15 * fVar15) goto LAB_00a42ef8;
piVar9 = (int *)0x0;
if (*(int *)param_3 != 0) {
piVar9 = (int *)(*(int *)param_3 + 0x1a3c);
}
piVar4 = (int *)(**(code **)(*piVar9 + 0xc0))(piVar9);
this_00 = (CBaseEntity *)(**(code **)(*piVar9 + 0xb4))(piVar9);
iVar10 = (**(code **)(*(int *)this_00 + 0x14c))(this_00);
if (iVar10 == 0) {
local_80e0 = 1.0;
}
else {
local_80e0 = *(float *)(iVar10 + 0x1cec);
}
cVar2 = (**(code **)(*(int *)this_00 + 0x16c))(this_00);
pCVar5 = (CBaseEntity *)0x0;
if (cVar2 != '\0') {
pCVar5 = this_00;
}
iVar10 = CBaseEntity::GetTeamNumber(this_00);
local_80d8 = 9;
if (iVar10 == 3) {
local_80d8 = (**(code **)(*(int *)this_00 + 0x544))(this_00);
}
cVar2 = (**(code **)(*piVar4 + 0x150))(piVar4,this);
if (cVar2 == '\0') goto LAB_00a42ef8;
fVar15 = *(float *)(this + 4);
fVar17 = *(float *)(this + 0x10);
fVar18 = *(float *)(this + 8);
fVar1 = *(float *)(this + 0x14);
if (pCVar8 != (CNavArea *)0x0) {
lVar13 = (longdouble)CNavArea::GetZDeltaAtEdgeToArea(pCVar8,this);
fVar14 = (float)lVar13;
lVar13 = (longdouble)(**(code **)(*piVar4 + 0x134))(piVar4);
if (fVar14 <= (float)lVar13) {
local_80cc = 1.0;
if (local_80d8 == 1) {
if (fVar14 < 0.0) {
fVar16 = fVar14 + fVar14;
}
else {
fVar16 = 0.0;
if (fVar14 <= 0.0) {
fVar16 = fVar14;
}
}
}
else {
fVar16 = 0.0;
if (0.0 <= fVar14) {
fVar16 = fVar14;
}
fVar14 = 1.0;
if (24.0 <= fVar16) {
fVar14 = (1.0 - local_80e0) * 3.0 + 1.0;
}
fVar16 = fVar16 * fVar14;
}
if (3.0 < ABS(fVar16)) {
local_80cc = ABS(fVar16) + 1.0;
}
if (pCVar5 == (CBaseEntity *)0x0) {
uVar6 = *(uint *)(this + 0x54);
}
else {
(**(code **)(InfectedPathCost::
operator()(CNavArea*,CNavArea*,CNavLadder_const*,CFuncElevator_const*,float)
::hideDesire + local_80d8 * 4))(&local_80cc,this);
uVar6 = *(uint *)(this + 0x54);
if ((uVar6 & 1) != 0) goto LAB_00a42ef8;
}
fVar14 = local_80cc;
if ((uVar6 & 0x80000) != 0) {
fVar14 = local_80cc * 10.0;
}
fVar14 = *(float *)(pCVar8 + 0x44) + fVar14;
if ((this[0x39] != (CNavArea)0x0) &&
(fVar15 = (((fVar1 + fVar17) - fVar15) - fVar18) * 0.5, 1.0 <= fVar15)) {
fVar14 = fVar14 + ((float)(byte)this[0x39] * 50000.0) / fVar15;
}
if (0.0 <= fVar14) goto LAB_00a42ea9;
}
goto LAB_00a42ef8;
}
LAB_00a42ea9:
*(CNavArea **)(param_3 + 4) = this;
} 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.