SearchSurroundingAreas<TongueAttackPositionScan>
0x00ac85b0 · 5017 bytes · __cdecl
_Z22SearchSurroundingAreasI24TongueAttackPositionScanEvP8CNavAreaRK6VectorRT_fji
Decompiled
void (6 params)
/* void SearchSurroundingAreas<TongueAttackPositionScan>(CNavArea*, Vector const&,
TongueAttackPositionScan&, float, unsigned int, int) */
void SearchSurroundingAreas<TongueAttackPositionScan>
(CNavArea *param_1,Vector *param_2,TongueAttackPositionScan *param_3,float param_4,
uint param_5,int param_6)
{
float fVar1;
CNavArea *this;
char cVar2;
int *piVar3;
CBaseEntity *pCVar4;
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_80f0;
int local_80e8;
CNavArea *local_80e4;
float local_80e0;
float local_80d4;
CNavArea *local_80d0;
undefined4 local_80cc;
CNavArea *local_80c8;
float 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;
float local_8050;
float local_804c;
float local_8048;
float local_8044;
float 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) {
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_80d0 = param_1;
local_80cc = 0;
param_1[0x7c] = (CNavArea)((byte)param_1[0x7c] & 0xf0 | 9);
/* try { // try from 00ac867c to 00ac98a8 has its CatchHandler @ 00ac98ae */
CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
*)&local_8038,(OpenListInfo_t *)&local_80d0);
*(int *)(param_1 + 0x50) = CNavArea::m_masterMarker;
}
if (param_4 <= 0.0) {
local_80e0 = param_4;
}
else {
local_80e0 = param_4 * 1.5;
param_4 = param_4 * param_4;
}
while (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) || (cVar2 = CNavArea::IsBlocked(this,param_6,false), cVar2 == '\0'))
{
pCVar8 = *(CNavArea **)(this + 0x78);
if ((*(int *)(param_3 + 4) != 0) && (*(int *)(param_3 + 0xc) != 0)) {
CNavArea::GetClosestPointOnArea
(this,(Vector *)(*(int *)(param_3 + 0xc) + 0x2c),(Vector *)&local_8050);
CNavArea::GetClosestPointOnArea
(*(CNavArea **)(param_3 + 0xc),(Vector *)(this + 0x2c),(Vector *)&local_8044);
cVar2 = TerrorNavArea::IsCompletelyVisible
((TerrorNavArea *)this,*(TerrorNavArea **)(param_3 + 0xc));
if ((cVar2 != '\0') &&
(fVar14 = *(float *)(TongueRange._28_4_ + 0x2c) * 0.9,
(local_804c - local_8040) * (local_804c - local_8040) +
(local_8050 - local_8044) * (local_8050 - local_8044) +
(local_8048 - local_803c) * (local_8048 - local_803c) <= fVar14 * fVar14)) {
piVar9 = (int *)0x0;
if (*(int *)param_3 != 0) {
piVar9 = (int *)(*(int *)param_3 + 0x4028);
}
piVar3 = (int *)(**(code **)(*piVar9 + 0xc0))(piVar9);
pCVar4 = (CBaseEntity *)(**(code **)(*piVar9 + 0xb4))(piVar9);
iVar10 = (**(code **)(*(int *)pCVar4 + 0x14c))(pCVar4);
if (iVar10 == 0) {
local_80f0 = 1.0;
}
else {
local_80f0 = *(float *)(iVar10 + 0x1cec);
}
cVar2 = (**(code **)(*(int *)pCVar4 + 0x16c))(pCVar4);
pCVar5 = (CBaseEntity *)0x0;
if (cVar2 != '\0') {
pCVar5 = pCVar4;
}
iVar10 = CBaseEntity::GetTeamNumber(pCVar4);
local_80e8 = 9;
if (iVar10 == 3) {
local_80e8 = (**(code **)(*(int *)pCVar4 + 0x544))(pCVar4);
}
cVar2 = (**(code **)(*piVar3 + 0x150))(piVar3,this);
if (cVar2 != '\0') {
fVar14 = *(float *)(this + 4);
fVar17 = *(float *)(this + 0x10);
fVar18 = *(float *)(this + 8);
fVar1 = *(float *)(this + 0x14);
if (pCVar8 == (CNavArea *)0x0) {
LAB_00ac8a33:
fVar14 = *(float *)(this + 0x34);
pCVar4 = *(CBaseEntity **)(param_3 + 8);
if (((byte)pCVar4[0x14d] & 8) != 0) {
/* try { // try from 00ac9928 to 00ac9983 has its CatchHandler @ 00ac98ae */
CBaseEntity::CalcAbsolutePosition(pCVar4);
}
if (*(float *)(pCVar4 + 0x2e8) + 18.0 < fVar14) {
fVar14 = *(float *)(this + 0x34);
pCVar4 = *(CBaseEntity **)(param_3 + 8);
local_80c8 = this;
if (((byte)pCVar4[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(pCVar4);
}
local_80c4 = fVar14 - *(float *)(pCVar4 + 0x2e8);
CUtlVector<TongueAttackPositionScan::AttackArea,CUtlMemory<TongueAttackPositionScan::AttackArea,int>>
::InsertBefore((CUtlVector<TongueAttackPositionScan::AttackArea,CUtlMemory<TongueAttackPositionScan::AttackArea,int>>
*)(param_3 + 0x10),*(int *)(param_3 + 0x1c),
(AttackArea *)&local_80c8);
*(float *)(param_3 + 0x24) = *(float *)(param_3 + 0x24) + local_80c4;
}
}
else {
lVar13 = (longdouble)CNavArea::GetZDeltaAtEdgeToArea(pCVar8,this);
fVar16 = (float)lVar13;
lVar13 = (longdouble)(**(code **)(*piVar3 + 0x134))(piVar3);
if (fVar16 <= (float)lVar13) {
local_80d4 = 1.0;
if (local_80e8 == 1) {
if (fVar16 < 0.0) {
fVar15 = fVar16 + fVar16;
}
else {
fVar15 = 0.0;
if (fVar16 <= 0.0) {
fVar15 = fVar16;
}
}
}
else {
fVar15 = 0.0;
if (0.0 <= fVar16) {
fVar15 = fVar16;
}
fVar15 = (float)(~-(uint)(24.0 <= fVar15) & 0x3f800000 |
(uint)((1.0 - local_80f0) * 3.0 + 1.0) & -(uint)(24.0 <= fVar15)
) * fVar15;
}
if (3.0 < ABS(fVar15)) {
local_80d4 = ABS(fVar15) + 1.0;
}
if (pCVar5 == (CBaseEntity *)0x0) {
uVar6 = *(uint *)(this + 0x54);
}
else {
(**(code **)(InfectedPathCost::
operator()(CNavArea*,CNavArea*,CNavLadder_const*,CFuncElevator_const*,float)
::hideDesire + local_80e8 * 4))(&local_80d4,this);
uVar6 = *(uint *)(this + 0x54);
if ((uVar6 & 1) != 0) goto LAB_00ac8ac9;
}
fVar16 = local_80d4;
if ((uVar6 & 0x80000) != 0) {
fVar16 = local_80d4 * 10.0;
}
fVar16 = *(float *)(pCVar8 + 0x44) + fVar16;
if ((this[0x39] != (CNavArea)0x0) &&
(fVar14 = (((fVar1 + fVar17) - fVar14) - fVar18) * 0.5, 1.0 <= fVar14)) {
fVar16 = fVar16 + ((float)(byte)this[0x39] * 50000.0) / fVar14;
}
if (0.0 <= fVar16) goto LAB_00ac8a33;
}
}
}
}
}
LAB_00ac8ac9:
local_80e4 = this;
do {
piVar9 = *(int **)(local_80e4 + 0x58);
iVar10 = *piVar9;
if (0 < iVar10) {
iVar12 = 0;
iVar11 = iVar10;
do {
if (iVar11 < 1) {
LAB_00ac8b32:
pCVar8 = (CNavArea *)0x0;
}
else {
iVar7 = 0;
if (iVar12 != 0) {
do {
iVar7 = iVar7 + 1;
if (iVar7 == iVar11) goto LAB_00ac8b32;
} 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_80e0) {
fVar14 = *(float *)param_2;
if (*(float *)(pCVar8 + 4) <= fVar14) {
if (fVar14 <= *(float *)(pCVar8 + 0x10)) {
fVar14 = 0.0;
}
else {
fVar14 = fVar14 - *(float *)(pCVar8 + 0x10);
fVar14 = fVar14 * fVar14;
}
}
else {
fVar14 = *(float *)(pCVar8 + 4) - fVar14;
fVar14 = fVar14 * fVar14;
}
fVar17 = *(float *)(param_2 + 4);
if (*(float *)(pCVar8 + 8) <= fVar17) {
if (*(float *)(pCVar8 + 0x14) < fVar17) {
fVar17 = fVar17 - *(float *)(pCVar8 + 0x14);
fVar14 = fVar14 + fVar17 * fVar17;
}
}
else {
fVar17 = *(float *)(pCVar8 + 8) - fVar17;
fVar14 = fVar14 + fVar17 * fVar17;
}
if (fVar14 < param_4) {
fVar14 = 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) = fVar14;
*(float *)(pCVar8 + 0x40) = fVar14;
if (fVar14 < local_80e0) {
local_80c0 = pCVar8;
local_80bc = fVar14;
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_00ac8cf8;
}
}
}
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_00ac8cf8:
*(int *)(pCVar8 + 0x50) = CNavArea::m_masterMarker;
}
}
if (iVar12 + 1 == iVar10) break;
iVar12 = iVar12 + 1;
piVar9 = *(int **)(local_80e4 + 0x58);
iVar11 = *piVar9;
} while( true );
}
local_80e4 = local_80e4 + 4;
} while (local_80e4 != this + 0x10);
local_80e4 = this;
if ((param_5 & 1) != 0) {
do {
iVar10 = 0;
piVar9 = *(int **)(local_80e4 + 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_80e0 <= 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_00ac8ef2:
*(int *)(iVar11 + 0x50) = CNavArea::m_masterMarker;
}
else {
fVar14 = *(float *)param_2;
if (fVar14 < *(float *)(iVar11 + 4)) {
fVar14 = *(float *)(iVar11 + 4) - fVar14;
fVar14 = fVar14 * fVar14;
}
else if (fVar14 <= *(float *)(iVar11 + 0x10)) {
fVar14 = 0.0;
}
else {
fVar14 = fVar14 - *(float *)(iVar11 + 0x10);
fVar14 = fVar14 * fVar14;
}
fVar17 = *(float *)(param_2 + 4);
if (*(float *)(iVar11 + 8) <= fVar17) {
if (*(float *)(iVar11 + 0x14) < fVar17) {
fVar17 = fVar17 - *(float *)(iVar11 + 0x14);
fVar14 = fVar14 + fVar17 * fVar17;
}
}
else {
fVar17 = *(float *)(iVar11 + 8) - fVar17;
fVar14 = fVar14 + fVar17 * fVar17;
}
if (fVar14 < param_4) {
fVar18 = *(float *)(iVar11 + 0x2c) - *(float *)(this + 0x2c);
fVar14 = *(float *)(iVar11 + 0x34) - *(float *)(this + 0x34);
fVar17 = *(float *)(iVar11 + 0x30) - *(float *)(this + 0x30);
fVar14 = SQRT(fVar14 * fVar14 + fVar18 * fVar18 + fVar17 * fVar17) +
*(float *)(this + 0x44);
*(float *)(iVar11 + 0x44) = fVar14;
*(float *)(iVar11 + 0x40) = fVar14;
if (fVar14 < local_80e0) {
local_80b0 = iVar11;
local_80ac = fVar14;
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_00ac8ef2;
}
}
}
piVar9 = *(int **)(local_80e4 + 0x114);
}
iVar10 = iVar10 + 1;
} while (iVar10 < *piVar9);
}
local_80e4 = local_80e4 + 4;
} while (local_80e4 != this + 0x10);
}
local_80e4 = (CNavArea *)0x0;
piVar9 = *(int **)(this + 0x68);
if (0 < *piVar9) {
do {
iVar10 = piVar9[(int)local_80e4 + 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_80e0 <= 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_00ac937b:
*(int *)(iVar11 + 0x50) = CNavArea::m_masterMarker;
}
else {
fVar14 = *(float *)param_2;
if (fVar14 < *(float *)(iVar11 + 4)) {
fVar14 = *(float *)(iVar11 + 4) - fVar14;
fVar14 = fVar14 * fVar14;
}
else if (fVar14 <= *(float *)(iVar11 + 0x10)) {
fVar14 = 0.0;
}
else {
fVar14 = fVar14 - *(float *)(iVar11 + 0x10);
fVar14 = fVar14 * fVar14;
}
fVar17 = *(float *)(param_2 + 4);
if (*(float *)(iVar11 + 8) <= fVar17) {
if (*(float *)(iVar11 + 0x14) < fVar17) {
fVar17 = fVar17 - *(float *)(iVar11 + 0x14);
fVar14 = fVar14 + fVar17 * fVar17;
}
}
else {
fVar17 = *(float *)(iVar11 + 8) - fVar17;
fVar14 = fVar14 + fVar17 * fVar17;
}
if (fVar14 < param_4) {
fVar14 = *(float *)(iVar11 + 0x2c) - *(float *)(this + 0x2c);
fVar18 = *(float *)(iVar11 + 0x34) - *(float *)(this + 0x34);
fVar17 = *(float *)(iVar11 + 0x30) - *(float *)(this + 0x30);
fVar14 = SQRT(fVar14 * fVar14 + fVar18 * fVar18 + fVar17 * fVar17) +
*(float *)(this + 0x44);
*(float *)(iVar11 + 0x44) = fVar14;
*(float *)(iVar11 + 0x40) = fVar14;
if (fVar14 < local_80e0) {
local_80a0 = iVar11;
local_809c = fVar14;
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_00ac937b;
}
}
}
}
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_80e0 <= 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_00ac93be:
*(int *)(iVar11 + 0x50) = CNavArea::m_masterMarker;
}
else {
fVar14 = *(float *)param_2;
if (*(float *)(iVar11 + 4) <= fVar14) {
if (fVar14 <= *(float *)(iVar11 + 0x10)) {
fVar14 = 0.0;
}
else {
fVar14 = fVar14 - *(float *)(iVar11 + 0x10);
fVar14 = fVar14 * fVar14;
}
}
else {
fVar14 = *(float *)(iVar11 + 4) - fVar14;
fVar14 = fVar14 * fVar14;
}
fVar17 = *(float *)(param_2 + 4);
if (*(float *)(iVar11 + 8) <= fVar17) {
if (*(float *)(iVar11 + 0x14) < fVar17) {
fVar17 = fVar17 - *(float *)(iVar11 + 0x14);
fVar14 = fVar14 + fVar17 * fVar17;
}
}
else {
fVar17 = *(float *)(iVar11 + 8) - fVar17;
fVar14 = fVar14 + fVar17 * fVar17;
}
if (fVar14 < param_4) {
fVar18 = *(float *)(iVar11 + 0x2c) - *(float *)(this + 0x2c);
fVar14 = *(float *)(iVar11 + 0x30) - *(float *)(this + 0x30);
fVar17 = *(float *)(iVar11 + 0x34) - *(float *)(this + 0x34);
fVar14 = SQRT(fVar14 * fVar14 + fVar18 * fVar18 + fVar17 * fVar17) +
*(float *)(this + 0x44);
*(float *)(iVar11 + 0x44) = fVar14;
*(float *)(iVar11 + 0x40) = fVar14;
if (fVar14 < local_80e0) {
local_8090 = iVar11;
local_808c = fVar14;
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_00ac93be;
}
}
}
}
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_80e0 <= 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_00ac9401:
*(int *)(iVar10 + 0x50) = CNavArea::m_masterMarker;
}
else {
fVar14 = *(float *)param_2;
if (*(float *)(iVar10 + 4) <= fVar14) {
if (fVar14 <= *(float *)(iVar10 + 0x10)) {
fVar14 = 0.0;
}
else {
fVar14 = fVar14 - *(float *)(iVar10 + 0x10);
fVar14 = fVar14 * fVar14;
}
}
else {
fVar14 = *(float *)(iVar10 + 4) - fVar14;
fVar14 = fVar14 * fVar14;
}
fVar17 = *(float *)(param_2 + 4);
if (*(float *)(iVar10 + 8) <= fVar17) {
if (*(float *)(iVar10 + 0x14) < fVar17) {
fVar17 = fVar17 - *(float *)(iVar10 + 0x14);
fVar14 = fVar14 + fVar17 * fVar17;
}
}
else {
fVar17 = *(float *)(iVar10 + 8) - fVar17;
fVar14 = fVar14 + fVar17 * fVar17;
}
if (fVar14 < param_4) {
fVar18 = *(float *)(iVar10 + 0x2c) - *(float *)(this + 0x2c);
fVar14 = *(float *)(iVar10 + 0x30) - *(float *)(this + 0x30);
fVar17 = *(float *)(iVar10 + 0x34) - *(float *)(this + 0x34);
fVar14 = SQRT(fVar14 * fVar14 + fVar18 * fVar18 + fVar17 * fVar17) +
*(float *)(this + 0x44);
*(float *)(iVar10 + 0x44) = fVar14;
*(float *)(iVar10 + 0x40) = fVar14;
if (fVar14 < local_80e0) {
local_8080 = iVar10;
local_807c = fVar14;
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_00ac9401;
}
}
}
}
local_80e4 = (CNavArea *)((int)local_80e4 + 1);
piVar9 = *(int **)(this + 0x68);
} while ((int)local_80e4 < *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_80e0 <= 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_00ac9635:
*(int *)(iVar11 + 0x50) = CNavArea::m_masterMarker;
}
else {
fVar14 = *(float *)param_2;
if (fVar14 < *(float *)(iVar11 + 4)) {
fVar14 = *(float *)(iVar11 + 4) - fVar14;
fVar14 = fVar14 * fVar14;
}
else if (fVar14 <= *(float *)(iVar11 + 0x10)) {
fVar14 = 0.0;
}
else {
fVar14 = fVar14 - *(float *)(iVar11 + 0x10);
fVar14 = fVar14 * fVar14;
}
fVar17 = *(float *)(param_2 + 4);
if (*(float *)(iVar11 + 8) <= fVar17) {
if (*(float *)(iVar11 + 0x14) < fVar17) {
fVar17 = fVar17 - *(float *)(iVar11 + 0x14);
fVar14 = fVar14 + fVar17 * fVar17;
}
}
else {
fVar17 = *(float *)(iVar11 + 8) - fVar17;
fVar14 = fVar14 + fVar17 * fVar17;
}
if (fVar14 < param_4) {
fVar18 = *(float *)(iVar11 + 0x2c) - *(float *)(this + 0x2c);
fVar14 = *(float *)(iVar11 + 0x30) - *(float *)(this + 0x30);
fVar17 = *(float *)(iVar11 + 0x34) - *(float *)(this + 0x34);
fVar14 = SQRT(fVar14 * fVar14 + fVar18 * fVar18 + fVar17 * fVar17) +
*(float *)(this + 0x44);
*(float *)(iVar11 + 0x44) = fVar14;
*(float *)(iVar11 + 0x40) = fVar14;
if (fVar14 < local_80e0) {
local_8070 = iVar11;
local_806c = fVar14;
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_00ac9635;
}
}
}
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_80e0 <= 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_00ac9814:
*(int *)(iVar11 + 0x50) = CNavArea::m_masterMarker;
}
else {
fVar14 = *(float *)param_2;
if (fVar14 < *(float *)(iVar11 + 4)) {
fVar14 = *(float *)(iVar11 + 4) - fVar14;
fVar14 = fVar14 * fVar14;
}
else if (fVar14 <= *(float *)(iVar11 + 0x10)) {
fVar14 = 0.0;
}
else {
fVar14 = fVar14 - *(float *)(iVar11 + 0x10);
fVar14 = fVar14 * fVar14;
}
fVar17 = *(float *)(param_2 + 4);
if (*(float *)(iVar11 + 8) <= fVar17) {
if (*(float *)(iVar11 + 0x14) < fVar17) {
fVar17 = fVar17 - *(float *)(iVar11 + 0x14);
fVar14 = fVar14 + fVar17 * fVar17;
}
}
else {
fVar17 = *(float *)(iVar11 + 8) - fVar17;
fVar14 = fVar14 + fVar17 * fVar17;
}
if (fVar14 < param_4) {
fVar18 = *(float *)(iVar11 + 0x2c) - *(float *)(this + 0x2c);
fVar14 = *(float *)(iVar11 + 0x30) - *(float *)(this + 0x30);
fVar17 = *(float *)(iVar11 + 0x34) - *(float *)(this + 0x34);
fVar14 = SQRT(fVar14 * fVar14 + fVar18 * fVar18 + fVar17 * fVar17) +
*(float *)(this + 0x44);
*(float *)(iVar11 + 0x44) = fVar14;
*(float *)(iVar11 + 0x40) = fVar14;
if (fVar14 < local_80e0) {
local_8060 = iVar11;
local_805c = fVar14;
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_00ac9814;
}
}
}
piVar9 = *(int **)pCVar8;
}
iVar10 = iVar10 + 1;
} while (iVar10 < *piVar9);
}
}
}
}
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.