L L4D2node

SearchSurroundingAreas<VantagePointScan>

0x008c2280 · 4151 bytes · __cdecl

_Z22SearchSurroundingAreasI16VantagePointScanEvP8CNavAreaRK6VectorRT_fji

Decompiled

void (6 params)

/* void SearchSurroundingAreas<VantagePointScan>(CNavArea*, Vector const&, VantagePointScan&, float,
   unsigned int, int) */

void SearchSurroundingAreas<VantagePointScan>
               (CNavArea *param_1,Vector *param_2,VantagePointScan *param_3,float param_4,
               uint param_5,int param_6)

{
  CNavArea *this;
  char cVar1;
  int iVar2;
  CNavArea *pCVar3;
  int *piVar4;
  int iVar5;
  int iVar6;
  int iVar7;
  float fVar8;
  float fVar9;
  float fVar10;
  float fVar11;
  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) {
    return;
  }
  iVar5 = CNavArea::m_masterMarker + 1;
  CNavArea::m_masterMarker = 1;
  if (iVar5 != 0) {
    CNavArea::m_masterMarker = iVar5;
  }
  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 008c234c to 008c322b has its CatchHandler @ 008c32ad */
    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;
  }
  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) &&
            (cVar1 = CNavArea::IsBlocked(this,param_6,false), cVar1 != '\0'));
    cVar1 = TerrorNavArea::IsCompletelyVisible((TerrorNavArea *)this,*(TerrorNavArea **)param_3);
    if ((cVar1 == '\0') ||
       ((fVar9 = *(float *)(param_3 + 4), 0.0 <= fVar9 &&
        (iVar5 = *(int *)param_3, fVar11 = *(float *)(this + 0x30) - *(float *)(iVar5 + 0x30),
        fVar8 = *(float *)(this + 0x34) - *(float *)(iVar5 + 0x34),
        fVar10 = *(float *)(this + 0x2c) - *(float *)(iVar5 + 0x2c),
        fVar9 * fVar9 <= fVar8 * fVar8 + fVar11 * fVar11 + fVar10 * fVar10)))) break;
    pCVar3 = this;
    if (*(int *)(param_3 + 8) == 0) {
      *(CNavArea **)(param_3 + 8) = this;
      goto LAB_008c245d;
    }
    fVar8 = *(float *)(*(int *)(param_3 + 8) + 0x44);
    fVar9 = *(float *)(this + 0x44);
    if (fVar9 < fVar8) {
      *(CNavArea **)(param_3 + 8) = this;
      goto LAB_008c2461;
    }
LAB_008c246b:
    if (fVar9 - fVar8 <= 500.0) {
LAB_008c247c:
      local_80c4 = this;
      do {
        piVar4 = *(int **)(local_80c4 + 0x58);
        iVar5 = *piVar4;
        if (0 < iVar5) {
          iVar7 = 0;
          iVar6 = iVar5;
          do {
            if (iVar6 < 1) {
LAB_008c24d2:
              pCVar3 = (CNavArea *)0x0;
            }
            else {
              iVar2 = 0;
              if (iVar7 != 0) {
                do {
                  iVar2 = iVar2 + 1;
                  if (iVar2 == iVar6) goto LAB_008c24d2;
                } while (iVar2 != iVar7);
              }
              pCVar3 = (CNavArea *)piVar4[iVar2 * 2 + 1];
            }
            if (((((param_5 & 4) == 0) ||
                 (cVar1 = CNavArea::IsConnected(pCVar3,this,4), cVar1 != '\0')) &&
                (pCVar3 != (CNavArea *)0x0)) &&
               ((*(int *)(pCVar3 + 0x3c) != CNavArea::m_masterMarker &&
                (CNavArea::m_masterMarker != *(int *)(pCVar3 + 0x50))))) {
              *(int *)(pCVar3 + 0x3c) = CNavArea::m_masterMarker;
              *(CNavArea **)(pCVar3 + 0x78) = this;
              pCVar3[0x7c] = (CNavArea)((byte)pCVar3[0x7c] & 0xf0 | 9);
              if (0.0 < local_80c0) {
                fVar9 = *(float *)param_2;
                if (*(float *)(pCVar3 + 4) <= fVar9) {
                  if (fVar9 <= *(float *)(pCVar3 + 0x10)) {
                    fVar9 = 0.0;
                  }
                  else {
                    fVar9 = fVar9 - *(float *)(pCVar3 + 0x10);
                    fVar9 = fVar9 * fVar9;
                  }
                }
                else {
                  fVar9 = *(float *)(pCVar3 + 4) - fVar9;
                  fVar9 = fVar9 * fVar9;
                }
                fVar8 = *(float *)(param_2 + 4);
                if (*(float *)(pCVar3 + 8) <= fVar8) {
                  if (*(float *)(pCVar3 + 0x14) < fVar8) {
                    fVar8 = fVar8 - *(float *)(pCVar3 + 0x14);
                    fVar9 = fVar9 + fVar8 * fVar8;
                  }
                }
                else {
                  fVar8 = *(float *)(pCVar3 + 8) - fVar8;
                  fVar9 = fVar9 + fVar8 * fVar8;
                }
                if (fVar9 < param_4) {
                  fVar9 = SQRT((*(float *)(pCVar3 + 0x30) - *(float *)(this + 0x30)) *
                               (*(float *)(pCVar3 + 0x30) - *(float *)(this + 0x30)) +
                               (*(float *)(pCVar3 + 0x2c) - *(float *)(this + 0x2c)) *
                               (*(float *)(pCVar3 + 0x2c) - *(float *)(this + 0x2c)) +
                               (*(float *)(pCVar3 + 0x34) - *(float *)(this + 0x34)) *
                               (*(float *)(pCVar3 + 0x34) - *(float *)(this + 0x34))) +
                          *(float *)(this + 0x44);
                  *(float *)(pCVar3 + 0x44) = fVar9;
                  *(float *)(pCVar3 + 0x40) = fVar9;
                  if (fVar9 < local_80c0) {
                    local_80a8 = pCVar3;
                    local_80a4 = fVar9;
                    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_008c2698;
                  }
                }
              }
              else {
                *(undefined4 *)(pCVar3 + 0x40) = 0;
                *(undefined4 *)(pCVar3 + 0x44) = 0;
                local_809c = 0;
                local_80a0 = pCVar3;
                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_008c2698:
                *(int *)(pCVar3 + 0x50) = CNavArea::m_masterMarker;
              }
            }
            if (iVar7 + 1 == iVar5) break;
            iVar7 = iVar7 + 1;
            piVar4 = *(int **)(local_80c4 + 0x58);
            iVar6 = *piVar4;
          } while( true );
        }
        local_80c4 = local_80c4 + 4;
      } while (local_80c4 != this + 0x10);
      local_80c4 = this;
      if ((param_5 & 1) != 0) {
        do {
          iVar5 = 0;
          piVar4 = *(int **)(local_80c4 + 0x114);
          if (0 < *piVar4) {
            do {
              iVar6 = piVar4[iVar5 * 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_008c2892:
                  *(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
                }
                else {
                  fVar9 = *(float *)param_2;
                  if (fVar9 < *(float *)(iVar6 + 4)) {
                    fVar9 = *(float *)(iVar6 + 4) - fVar9;
                    fVar9 = fVar9 * fVar9;
                  }
                  else if (fVar9 <= *(float *)(iVar6 + 0x10)) {
                    fVar9 = 0.0;
                  }
                  else {
                    fVar9 = fVar9 - *(float *)(iVar6 + 0x10);
                    fVar9 = fVar9 * fVar9;
                  }
                  fVar8 = *(float *)(param_2 + 4);
                  if (*(float *)(iVar6 + 8) <= fVar8) {
                    if (*(float *)(iVar6 + 0x14) < fVar8) {
                      fVar8 = fVar8 - *(float *)(iVar6 + 0x14);
                      fVar9 = fVar9 + fVar8 * fVar8;
                    }
                  }
                  else {
                    fVar8 = *(float *)(iVar6 + 8) - fVar8;
                    fVar9 = fVar9 + fVar8 * fVar8;
                  }
                  if (fVar9 < param_4) {
                    fVar9 = *(float *)(iVar6 + 0x2c) - *(float *)(this + 0x2c);
                    fVar10 = *(float *)(iVar6 + 0x34) - *(float *)(this + 0x34);
                    fVar8 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
                    fVar9 = SQRT(fVar9 * fVar9 + fVar10 * fVar10 + fVar8 * fVar8) +
                            *(float *)(this + 0x44);
                    *(float *)(iVar6 + 0x44) = fVar9;
                    *(float *)(iVar6 + 0x40) = fVar9;
                    if (fVar9 < local_80c0) {
                      local_8098 = iVar6;
                      local_8094 = fVar9;
                      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_008c2892;
                    }
                  }
                }
                piVar4 = *(int **)(local_80c4 + 0x114);
              }
              iVar5 = iVar5 + 1;
            } while (iVar5 < *piVar4);
          }
          local_80c4 = local_80c4 + 4;
        } while (this + 0x10 != local_80c4);
      }
      if ((this != (CNavArea *)0xffffff98) && (piVar4 = *(int **)(this + 0x68), 0 < *piVar4)) {
        local_80c4 = (CNavArea *)0x0;
        do {
          iVar5 = piVar4[(int)local_80c4 + 1];
          iVar6 = *(int *)(iVar5 + 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_008c2d2b:
              *(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
            }
            else {
              fVar9 = *(float *)param_2;
              if (fVar9 < *(float *)(iVar6 + 4)) {
                fVar9 = *(float *)(iVar6 + 4) - fVar9;
                fVar9 = fVar9 * fVar9;
              }
              else if (fVar9 <= *(float *)(iVar6 + 0x10)) {
                fVar9 = 0.0;
              }
              else {
                fVar9 = fVar9 - *(float *)(iVar6 + 0x10);
                fVar9 = fVar9 * fVar9;
              }
              fVar8 = *(float *)(param_2 + 4);
              if (*(float *)(iVar6 + 8) <= fVar8) {
                if (*(float *)(iVar6 + 0x14) < fVar8) {
                  fVar8 = fVar8 - *(float *)(iVar6 + 0x14);
                  fVar9 = fVar9 + fVar8 * fVar8;
                }
              }
              else {
                fVar8 = *(float *)(iVar6 + 8) - fVar8;
                fVar9 = fVar9 + fVar8 * fVar8;
              }
              if (fVar9 < param_4) {
                fVar9 = *(float *)(iVar6 + 0x2c) - *(float *)(this + 0x2c);
                fVar10 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
                fVar8 = *(float *)(iVar6 + 0x34) - *(float *)(this + 0x34);
                fVar9 = SQRT(fVar9 * fVar9 + fVar10 * fVar10 + fVar8 * fVar8) +
                        *(float *)(this + 0x44);
                *(float *)(iVar6 + 0x44) = fVar9;
                *(float *)(iVar6 + 0x40) = fVar9;
                if (fVar9 < local_80c0) {
                  local_8088 = iVar6;
                  local_8084 = fVar9;
                  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_008c2d2b;
                }
              }
            }
          }
          iVar6 = *(int *)(iVar5 + 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_008c2db1:
              *(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
            }
            else {
              fVar9 = *(float *)param_2;
              if (*(float *)(iVar6 + 4) <= fVar9) {
                if (fVar9 <= *(float *)(iVar6 + 0x10)) {
                  fVar9 = 0.0;
                }
                else {
                  fVar9 = fVar9 - *(float *)(iVar6 + 0x10);
                  fVar9 = fVar9 * fVar9;
                }
              }
              else {
                fVar9 = *(float *)(iVar6 + 4) - fVar9;
                fVar9 = fVar9 * fVar9;
              }
              fVar8 = *(float *)(param_2 + 4);
              if (*(float *)(iVar6 + 8) <= fVar8) {
                if (*(float *)(iVar6 + 0x14) < fVar8) {
                  fVar8 = fVar8 - *(float *)(iVar6 + 0x14);
                  fVar9 = fVar9 + fVar8 * fVar8;
                }
              }
              else {
                fVar8 = *(float *)(iVar6 + 8) - fVar8;
                fVar9 = fVar9 + fVar8 * fVar8;
              }
              if (fVar9 < param_4) {
                fVar9 = *(float *)(iVar6 + 0x2c) - *(float *)(this + 0x2c);
                fVar10 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
                fVar8 = *(float *)(iVar6 + 0x34) - *(float *)(this + 0x34);
                fVar9 = SQRT(fVar9 * fVar9 + fVar10 * fVar10 + fVar8 * fVar8) +
                        *(float *)(this + 0x44);
                *(float *)(iVar6 + 0x44) = fVar9;
                *(float *)(iVar6 + 0x40) = fVar9;
                if (fVar9 < local_80c0) {
                  local_8078 = iVar6;
                  local_8074 = fVar9;
                  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_008c2db1;
                }
              }
            }
          }
          iVar5 = *(int *)(iVar5 + 0x2c);
          if (((iVar5 != 0) && (*(int *)(iVar5 + 0x3c) != CNavArea::m_masterMarker)) &&
             (CNavArea::m_masterMarker != *(int *)(iVar5 + 0x50))) {
            *(int *)(iVar5 + 0x3c) = CNavArea::m_masterMarker;
            *(CNavArea **)(iVar5 + 0x78) = this;
            *(byte *)(iVar5 + 0x7c) = *(byte *)(iVar5 + 0x7c) & 0xf0 | 9;
            if (local_80c0 <= 0.0) {
              *(undefined4 *)(iVar5 + 0x40) = 0;
              *(undefined4 *)(iVar5 + 0x44) = 0;
              local_805c = 0;
              local_8060 = iVar5;
              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_008c2d6e:
              *(int *)(iVar5 + 0x50) = CNavArea::m_masterMarker;
            }
            else {
              fVar9 = *(float *)param_2;
              if (*(float *)(iVar5 + 4) <= fVar9) {
                if (fVar9 <= *(float *)(iVar5 + 0x10)) {
                  fVar9 = 0.0;
                }
                else {
                  fVar9 = fVar9 - *(float *)(iVar5 + 0x10);
                  fVar9 = fVar9 * fVar9;
                }
              }
              else {
                fVar9 = *(float *)(iVar5 + 4) - fVar9;
                fVar9 = fVar9 * fVar9;
              }
              fVar8 = *(float *)(param_2 + 4);
              if (*(float *)(iVar5 + 8) <= fVar8) {
                if (*(float *)(iVar5 + 0x14) < fVar8) {
                  fVar8 = fVar8 - *(float *)(iVar5 + 0x14);
                  fVar9 = fVar9 + fVar8 * fVar8;
                }
              }
              else {
                fVar8 = *(float *)(iVar5 + 8) - fVar8;
                fVar9 = fVar9 + fVar8 * fVar8;
              }
              if (fVar9 < param_4) {
                fVar10 = *(float *)(iVar5 + 0x2c) - *(float *)(this + 0x2c);
                fVar9 = *(float *)(iVar5 + 0x30) - *(float *)(this + 0x30);
                fVar8 = *(float *)(iVar5 + 0x34) - *(float *)(this + 0x34);
                fVar9 = SQRT(fVar9 * fVar9 + fVar10 * fVar10 + fVar8 * fVar8) +
                        *(float *)(this + 0x44);
                *(float *)(iVar5 + 0x44) = fVar9;
                *(float *)(iVar5 + 0x40) = fVar9;
                if (fVar9 < local_80c0) {
                  local_8068 = iVar5;
                  local_8064 = fVar9;
                  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_008c2d6e;
                }
              }
            }
          }
          local_80c4 = (CNavArea *)((int)local_80c4 + 1);
          piVar4 = *(int **)(this + 0x68);
        } while ((int)local_80c4 < *piVar4);
      }
      if ((this != (CNavArea *)0xffffff94) && (piVar4 = *(int **)(this + 0x6c), 0 < *piVar4)) {
        iVar5 = 0;
        do {
          iVar6 = *(int *)(piVar4[iVar5 + 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_008c2fec:
              *(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
            }
            else {
              fVar9 = *(float *)param_2;
              if (fVar9 < *(float *)(iVar6 + 4)) {
                fVar9 = *(float *)(iVar6 + 4) - fVar9;
                fVar9 = fVar9 * fVar9;
              }
              else if (fVar9 <= *(float *)(iVar6 + 0x10)) {
                fVar9 = 0.0;
              }
              else {
                fVar9 = fVar9 - *(float *)(iVar6 + 0x10);
                fVar9 = fVar9 * fVar9;
              }
              fVar8 = *(float *)(param_2 + 4);
              if (*(float *)(iVar6 + 8) <= fVar8) {
                if (*(float *)(iVar6 + 0x14) < fVar8) {
                  fVar8 = fVar8 - *(float *)(iVar6 + 0x14);
                  fVar9 = fVar9 + fVar8 * fVar8;
                }
              }
              else {
                fVar8 = *(float *)(iVar6 + 8) - fVar8;
                fVar9 = fVar9 + fVar8 * fVar8;
              }
              if (fVar9 < param_4) {
                fVar10 = *(float *)(iVar6 + 0x2c) - *(float *)(this + 0x2c);
                fVar9 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
                fVar8 = *(float *)(iVar6 + 0x34) - *(float *)(this + 0x34);
                fVar9 = SQRT(fVar9 * fVar9 + fVar10 * fVar10 + fVar8 * fVar8) +
                        *(float *)(this + 0x44);
                *(float *)(iVar6 + 0x44) = fVar9;
                *(float *)(iVar6 + 0x40) = fVar9;
                if (fVar9 < local_80c0) {
                  local_8058 = iVar6;
                  local_8054 = fVar9;
                  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_008c2fec;
                }
              }
            }
            piVar4 = *(int **)(this + 0x6c);
          }
          iVar5 = iVar5 + 1;
        } while (iVar5 < *piVar4);
      }
      if ((param_5 & 8) == 0) {
        if ((CNavArea::GetElevatorAreas()::empty == '\0') &&
           (iVar5 = __cxa_guard_acquire(&CNavArea::GetElevatorAreas()::empty), iVar5 != 0)) {
          if ((CUtlVectorUltraConservative<NavConnect,CUtlVectorUltraConservativeAllocator>::
               StaticData()::staticData == '\0') &&
             (iVar5 = __cxa_guard_acquire(&CUtlVectorUltraConservative<NavConnect,CUtlVectorUltraConservativeAllocator>
                                           ::StaticData()::staticData), iVar5 != 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);
        }
        pCVar3 = this + 0x88;
        if (((byte)this[0x57] & 0x40) == 0) {
          pCVar3 = (CNavArea *)&CNavArea::GetElevatorAreas()::empty;
        }
        piVar4 = *(int **)pCVar3;
        if (0 < *piVar4) {
          iVar5 = 0;
          do {
            iVar6 = piVar4[iVar5 * 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_008c31f9:
                *(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
              }
              else {
                fVar9 = *(float *)param_2;
                if (fVar9 < *(float *)(iVar6 + 4)) {
                  fVar9 = *(float *)(iVar6 + 4) - fVar9;
                  fVar9 = fVar9 * fVar9;
                }
                else if (fVar9 <= *(float *)(iVar6 + 0x10)) {
                  fVar9 = 0.0;
                }
                else {
                  fVar9 = fVar9 - *(float *)(iVar6 + 0x10);
                  fVar9 = fVar9 * fVar9;
                }
                fVar8 = *(float *)(param_2 + 4);
                if (*(float *)(iVar6 + 8) <= fVar8) {
                  if (*(float *)(iVar6 + 0x14) < fVar8) {
                    fVar8 = fVar8 - *(float *)(iVar6 + 0x14);
                    fVar9 = fVar9 + fVar8 * fVar8;
                  }
                }
                else {
                  fVar8 = *(float *)(iVar6 + 8) - fVar8;
                  fVar9 = fVar9 + fVar8 * fVar8;
                }
                if (fVar9 < param_4) {
                  fVar10 = *(float *)(iVar6 + 0x2c) - *(float *)(this + 0x2c);
                  fVar9 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
                  fVar8 = *(float *)(iVar6 + 0x34) - *(float *)(this + 0x34);
                  fVar9 = SQRT(fVar9 * fVar9 + fVar10 * fVar10 + fVar8 * fVar8) +
                          *(float *)(this + 0x44);
                  *(float *)(iVar6 + 0x44) = fVar9;
                  *(float *)(iVar6 + 0x40) = fVar9;
                  if (fVar9 < local_80c0) {
                    local_8048 = iVar6;
                    local_8044 = fVar9;
                    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_008c31f9;
                  }
                }
              }
              piVar4 = *(int **)pCVar3;
            }
            iVar5 = iVar5 + 1;
          } while (iVar5 < *piVar4);
        }
      }
    }
  }
  pCVar3 = *(CNavArea **)(param_3 + 8);
LAB_008c245d:
  if (pCVar3 != (CNavArea *)0x0) {
LAB_008c2461:
    fVar9 = *(float *)(this + 0x44);
    fVar8 = *(float *)(pCVar3 + 0x44);
    goto LAB_008c246b;
  }
  goto LAB_008c247c;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)