L L4D2node

SearchSurroundingAreas<RescueVehicleAreaDepth>

0x0098c130 · 3957 bytes · __cdecl

_Z22SearchSurroundingAreasI22RescueVehicleAreaDepthEvP8CNavAreaRK6VectorRT_fji

Decompiled

void (6 params)

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

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

{
  CNavArea *this;
  char cVar1;
  int iVar2;
  int iVar3;
  CNavArea *pCVar4;
  int *piVar5;
  int iVar6;
  int iVar7;
  float fVar8;
  float fVar9;
  float fVar10;
  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) {
    iVar6 = CNavArea::m_masterMarker + 1;
    CNavArea::m_masterMarker = 1;
    if (iVar6 != 0) {
      CNavArea::m_masterMarker = iVar6;
    }
    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 0098c1fc to 0098d034 has its CatchHandler @ 0098d0c2 */
      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 (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) || (cVar1 = CNavArea::IsBlocked(this,param_6,false), cVar1 == '\0'))
      {
        if (((byte)this[0x12d] & 0x80) == 0) {
          iVar6 = *(int *)(this + 0x78);
          iVar2 = 0;
          do {
            if (iVar6 == 0) break;
            iVar2 = iVar2 + 1;
            iVar6 = *(int *)(iVar6 + 0x78);
          } while (iVar2 < 0x10);
          if (*(int *)param_3 < iVar2) {
            *(int *)param_3 = iVar2;
          }
        }
        else {
          local_80c4 = this;
          do {
            piVar5 = *(int **)(local_80c4 + 0x58);
            iVar6 = *piVar5;
            if (0 < iVar6) {
              iVar7 = 0;
              iVar2 = iVar6;
              do {
                if (iVar2 < 1) {
LAB_0098c342:
                  pCVar4 = (CNavArea *)0x0;
                }
                else {
                  iVar3 = 0;
                  if (iVar7 != 0) {
                    do {
                      iVar3 = iVar3 + 1;
                      if (iVar3 == iVar2) goto LAB_0098c342;
                    } while (iVar3 != iVar7);
                  }
                  pCVar4 = (CNavArea *)piVar5[iVar3 * 2 + 1];
                }
                if (((((param_5 & 4) == 0) ||
                     (cVar1 = CNavArea::IsConnected(pCVar4,this,4), cVar1 != '\0')) &&
                    (pCVar4 != (CNavArea *)0x0)) &&
                   ((*(int *)(pCVar4 + 0x3c) != CNavArea::m_masterMarker &&
                    (CNavArea::m_masterMarker != *(int *)(pCVar4 + 0x50))))) {
                  *(int *)(pCVar4 + 0x3c) = CNavArea::m_masterMarker;
                  *(CNavArea **)(pCVar4 + 0x78) = this;
                  pCVar4[0x7c] = (CNavArea)((byte)pCVar4[0x7c] & 0xf0 | 9);
                  if (0.0 < local_80c0) {
                    fVar8 = *(float *)param_2;
                    if (*(float *)(pCVar4 + 4) <= fVar8) {
                      if (fVar8 <= *(float *)(pCVar4 + 0x10)) {
                        fVar8 = 0.0;
                      }
                      else {
                        fVar8 = fVar8 - *(float *)(pCVar4 + 0x10);
                        fVar8 = fVar8 * fVar8;
                      }
                    }
                    else {
                      fVar8 = *(float *)(pCVar4 + 4) - fVar8;
                      fVar8 = fVar8 * fVar8;
                    }
                    fVar9 = *(float *)(param_2 + 4);
                    if (*(float *)(pCVar4 + 8) <= fVar9) {
                      if (*(float *)(pCVar4 + 0x14) < fVar9) {
                        fVar9 = fVar9 - *(float *)(pCVar4 + 0x14);
                        fVar8 = fVar8 + fVar9 * fVar9;
                      }
                    }
                    else {
                      fVar9 = *(float *)(pCVar4 + 8) - fVar9;
                      fVar8 = fVar8 + fVar9 * fVar9;
                    }
                    if (fVar8 < param_4) {
                      fVar8 = SQRT((*(float *)(pCVar4 + 0x30) - *(float *)(this + 0x30)) *
                                   (*(float *)(pCVar4 + 0x30) - *(float *)(this + 0x30)) +
                                   (*(float *)(pCVar4 + 0x2c) - *(float *)(this + 0x2c)) *
                                   (*(float *)(pCVar4 + 0x2c) - *(float *)(this + 0x2c)) +
                                   (*(float *)(pCVar4 + 0x34) - *(float *)(this + 0x34)) *
                                   (*(float *)(pCVar4 + 0x34) - *(float *)(this + 0x34))) +
                              *(float *)(this + 0x44);
                      *(float *)(pCVar4 + 0x44) = fVar8;
                      *(float *)(pCVar4 + 0x40) = fVar8;
                      if (fVar8 < local_80c0) {
                        local_80a8 = pCVar4;
                        local_80a4 = fVar8;
                        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_0098c508;
                      }
                    }
                  }
                  else {
                    *(undefined4 *)(pCVar4 + 0x40) = 0;
                    *(undefined4 *)(pCVar4 + 0x44) = 0;
                    local_809c = 0;
                    local_80a0 = pCVar4;
                    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_0098c508:
                    *(int *)(pCVar4 + 0x50) = CNavArea::m_masterMarker;
                  }
                }
                if (iVar7 + 1 == iVar6) break;
                iVar7 = iVar7 + 1;
                piVar5 = *(int **)(local_80c4 + 0x58);
                iVar2 = *piVar5;
              } while( true );
            }
            local_80c4 = local_80c4 + 4;
          } while (local_80c4 != this + 0x10);
          local_80c4 = this;
          if ((param_5 & 1) != 0) {
            do {
              iVar6 = 0;
              piVar5 = *(int **)(local_80c4 + 0x114);
              if (0 < *piVar5) {
                do {
                  iVar2 = piVar5[iVar6 * 2 + 1];
                  if (((iVar2 != 0) && (*(int *)(iVar2 + 0x3c) != CNavArea::m_masterMarker)) &&
                     (CNavArea::m_masterMarker != *(int *)(iVar2 + 0x50))) {
                    *(int *)(iVar2 + 0x3c) = CNavArea::m_masterMarker;
                    *(CNavArea **)(iVar2 + 0x78) = this;
                    *(byte *)(iVar2 + 0x7c) = *(byte *)(iVar2 + 0x7c) & 0xf0 | 9;
                    if (local_80c0 <= 0.0) {
                      *(undefined4 *)(iVar2 + 0x40) = 0;
                      *(undefined4 *)(iVar2 + 0x44) = 0;
                      local_808c = 0;
                      local_8090 = iVar2;
                      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_0098c702:
                      *(int *)(iVar2 + 0x50) = CNavArea::m_masterMarker;
                    }
                    else {
                      fVar8 = *(float *)param_2;
                      if (fVar8 < *(float *)(iVar2 + 4)) {
                        fVar8 = *(float *)(iVar2 + 4) - fVar8;
                        fVar8 = fVar8 * fVar8;
                      }
                      else if (fVar8 <= *(float *)(iVar2 + 0x10)) {
                        fVar8 = 0.0;
                      }
                      else {
                        fVar8 = fVar8 - *(float *)(iVar2 + 0x10);
                        fVar8 = fVar8 * fVar8;
                      }
                      fVar9 = *(float *)(param_2 + 4);
                      if (*(float *)(iVar2 + 8) <= fVar9) {
                        if (*(float *)(iVar2 + 0x14) < fVar9) {
                          fVar9 = fVar9 - *(float *)(iVar2 + 0x14);
                          fVar8 = fVar8 + fVar9 * fVar9;
                        }
                      }
                      else {
                        fVar9 = *(float *)(iVar2 + 8) - fVar9;
                        fVar8 = fVar8 + fVar9 * fVar9;
                      }
                      if (fVar8 < param_4) {
                        fVar8 = *(float *)(iVar2 + 0x30) - *(float *)(this + 0x30);
                        fVar10 = *(float *)(iVar2 + 0x34) - *(float *)(this + 0x34);
                        fVar9 = *(float *)(iVar2 + 0x2c) - *(float *)(this + 0x2c);
                        fVar8 = SQRT(fVar8 * fVar8 + fVar10 * fVar10 + fVar9 * fVar9) +
                                *(float *)(this + 0x44);
                        *(float *)(iVar2 + 0x44) = fVar8;
                        *(float *)(iVar2 + 0x40) = fVar8;
                        if (fVar8 < local_80c0) {
                          local_8098 = iVar2;
                          local_8094 = fVar8;
                          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_0098c702;
                        }
                      }
                    }
                    piVar5 = *(int **)(local_80c4 + 0x114);
                  }
                  iVar6 = iVar6 + 1;
                } while (iVar6 < *piVar5);
              }
              local_80c4 = local_80c4 + 4;
            } while (local_80c4 != this + 0x10);
          }
          local_80c4 = (CNavArea *)0x0;
          piVar5 = *(int **)(this + 0x68);
          if (0 < *piVar5) {
            do {
              iVar6 = piVar5[(int)local_80c4 + 1];
              iVar2 = *(int *)(iVar6 + 0x24);
              if (((iVar2 != 0) && (*(int *)(iVar2 + 0x3c) != CNavArea::m_masterMarker)) &&
                 (CNavArea::m_masterMarker != *(int *)(iVar2 + 0x50))) {
                *(int *)(iVar2 + 0x3c) = CNavArea::m_masterMarker;
                *(CNavArea **)(iVar2 + 0x78) = this;
                *(byte *)(iVar2 + 0x7c) = *(byte *)(iVar2 + 0x7c) & 0xf0 | 9;
                if (local_80c0 <= 0.0) {
                  *(undefined4 *)(iVar2 + 0x40) = 0;
                  *(undefined4 *)(iVar2 + 0x44) = 0;
                  local_807c = 0;
                  local_8080 = iVar2;
                  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_0098cb3b:
                  *(int *)(iVar2 + 0x50) = CNavArea::m_masterMarker;
                }
                else {
                  fVar8 = *(float *)param_2;
                  if (fVar8 < *(float *)(iVar2 + 4)) {
                    fVar8 = *(float *)(iVar2 + 4) - fVar8;
                    fVar8 = fVar8 * fVar8;
                  }
                  else if (fVar8 <= *(float *)(iVar2 + 0x10)) {
                    fVar8 = 0.0;
                  }
                  else {
                    fVar8 = fVar8 - *(float *)(iVar2 + 0x10);
                    fVar8 = fVar8 * fVar8;
                  }
                  fVar9 = *(float *)(param_2 + 4);
                  if (*(float *)(iVar2 + 8) <= fVar9) {
                    if (*(float *)(iVar2 + 0x14) < fVar9) {
                      fVar9 = fVar9 - *(float *)(iVar2 + 0x14);
                      fVar8 = fVar8 + fVar9 * fVar9;
                    }
                  }
                  else {
                    fVar9 = *(float *)(iVar2 + 8) - fVar9;
                    fVar8 = fVar8 + fVar9 * fVar9;
                  }
                  if (fVar8 < param_4) {
                    fVar8 = *(float *)(iVar2 + 0x2c) - *(float *)(this + 0x2c);
                    fVar10 = *(float *)(iVar2 + 0x34) - *(float *)(this + 0x34);
                    fVar9 = *(float *)(iVar2 + 0x30) - *(float *)(this + 0x30);
                    fVar8 = SQRT(fVar8 * fVar8 + fVar10 * fVar10 + fVar9 * fVar9) +
                            *(float *)(this + 0x44);
                    *(float *)(iVar2 + 0x44) = fVar8;
                    *(float *)(iVar2 + 0x40) = fVar8;
                    if (fVar8 < local_80c0) {
                      local_8088 = iVar2;
                      local_8084 = fVar8;
                      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_0098cb3b;
                    }
                  }
                }
              }
              iVar2 = *(int *)(iVar6 + 0x28);
              if (((iVar2 != 0) && (*(int *)(iVar2 + 0x3c) != CNavArea::m_masterMarker)) &&
                 (CNavArea::m_masterMarker != *(int *)(iVar2 + 0x50))) {
                *(int *)(iVar2 + 0x3c) = CNavArea::m_masterMarker;
                *(CNavArea **)(iVar2 + 0x78) = this;
                *(byte *)(iVar2 + 0x7c) = *(byte *)(iVar2 + 0x7c) & 0xf0 | 9;
                if (local_80c0 <= 0.0) {
                  *(undefined4 *)(iVar2 + 0x40) = 0;
                  *(undefined4 *)(iVar2 + 0x44) = 0;
                  local_806c = 0;
                  local_8070 = iVar2;
                  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_0098cbc1:
                  *(int *)(iVar2 + 0x50) = CNavArea::m_masterMarker;
                }
                else {
                  fVar8 = *(float *)param_2;
                  if (*(float *)(iVar2 + 4) <= fVar8) {
                    if (fVar8 <= *(float *)(iVar2 + 0x10)) {
                      fVar8 = 0.0;
                    }
                    else {
                      fVar8 = fVar8 - *(float *)(iVar2 + 0x10);
                      fVar8 = fVar8 * fVar8;
                    }
                  }
                  else {
                    fVar8 = *(float *)(iVar2 + 4) - fVar8;
                    fVar8 = fVar8 * fVar8;
                  }
                  fVar9 = *(float *)(param_2 + 4);
                  if (*(float *)(iVar2 + 8) <= fVar9) {
                    if (*(float *)(iVar2 + 0x14) < fVar9) {
                      fVar9 = fVar9 - *(float *)(iVar2 + 0x14);
                      fVar8 = fVar8 + fVar9 * fVar9;
                    }
                  }
                  else {
                    fVar9 = *(float *)(iVar2 + 8) - fVar9;
                    fVar8 = fVar8 + fVar9 * fVar9;
                  }
                  if (fVar8 < param_4) {
                    fVar10 = *(float *)(iVar2 + 0x2c) - *(float *)(this + 0x2c);
                    fVar8 = *(float *)(iVar2 + 0x30) - *(float *)(this + 0x30);
                    fVar9 = *(float *)(iVar2 + 0x34) - *(float *)(this + 0x34);
                    fVar8 = SQRT(fVar8 * fVar8 + fVar10 * fVar10 + fVar9 * fVar9) +
                            *(float *)(this + 0x44);
                    *(float *)(iVar2 + 0x44) = fVar8;
                    *(float *)(iVar2 + 0x40) = fVar8;
                    if (fVar8 < local_80c0) {
                      local_8078 = iVar2;
                      local_8074 = fVar8;
                      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_0098cbc1;
                    }
                  }
                }
              }
              iVar6 = *(int *)(iVar6 + 0x2c);
              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_805c = 0;
                  local_8060 = 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_8060);
LAB_0098cb7e:
                  *(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
                }
                else {
                  fVar8 = *(float *)param_2;
                  if (*(float *)(iVar6 + 4) <= fVar8) {
                    if (fVar8 <= *(float *)(iVar6 + 0x10)) {
                      fVar8 = 0.0;
                    }
                    else {
                      fVar8 = fVar8 - *(float *)(iVar6 + 0x10);
                      fVar8 = fVar8 * fVar8;
                    }
                  }
                  else {
                    fVar8 = *(float *)(iVar6 + 4) - fVar8;
                    fVar8 = fVar8 * fVar8;
                  }
                  fVar9 = *(float *)(param_2 + 4);
                  if (*(float *)(iVar6 + 8) <= fVar9) {
                    if (*(float *)(iVar6 + 0x14) < fVar9) {
                      fVar9 = fVar9 - *(float *)(iVar6 + 0x14);
                      fVar8 = fVar8 + fVar9 * fVar9;
                    }
                  }
                  else {
                    fVar9 = *(float *)(iVar6 + 8) - fVar9;
                    fVar8 = fVar8 + fVar9 * fVar9;
                  }
                  if (fVar8 < param_4) {
                    fVar8 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
                    fVar10 = *(float *)(iVar6 + 0x34) - *(float *)(this + 0x34);
                    fVar9 = *(float *)(iVar6 + 0x2c) - *(float *)(this + 0x2c);
                    fVar8 = SQRT(fVar8 * fVar8 + fVar10 * fVar10 + fVar9 * fVar9) +
                            *(float *)(this + 0x44);
                    *(float *)(iVar6 + 0x44) = fVar8;
                    *(float *)(iVar6 + 0x40) = fVar8;
                    if (fVar8 < local_80c0) {
                      local_8068 = iVar6;
                      local_8064 = fVar8;
                      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_0098cb7e;
                    }
                  }
                }
              }
              local_80c4 = (CNavArea *)((int)local_80c4 + 1);
              piVar5 = *(int **)(this + 0x68);
            } while ((int)local_80c4 < *piVar5);
          }
          piVar5 = *(int **)(this + 0x6c);
          iVar6 = 0;
          if (0 < *piVar5) {
            do {
              iVar2 = *(int *)(piVar5[iVar6 + 1] + 0x34);
              if (((iVar2 != 0) && (*(int *)(iVar2 + 0x3c) != CNavArea::m_masterMarker)) &&
                 (CNavArea::m_masterMarker != *(int *)(iVar2 + 0x50))) {
                *(int *)(iVar2 + 0x3c) = CNavArea::m_masterMarker;
                *(CNavArea **)(iVar2 + 0x78) = this;
                *(byte *)(iVar2 + 0x7c) = *(byte *)(iVar2 + 0x7c) & 0xf0 | 9;
                if (local_80c0 <= 0.0) {
                  *(undefined4 *)(iVar2 + 0x40) = 0;
                  *(undefined4 *)(iVar2 + 0x44) = 0;
                  local_804c = 0;
                  local_8050 = iVar2;
                  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_0098cdf5:
                  *(int *)(iVar2 + 0x50) = CNavArea::m_masterMarker;
                }
                else {
                  fVar8 = *(float *)param_2;
                  if (fVar8 < *(float *)(iVar2 + 4)) {
                    fVar8 = *(float *)(iVar2 + 4) - fVar8;
                    fVar8 = fVar8 * fVar8;
                  }
                  else if (fVar8 <= *(float *)(iVar2 + 0x10)) {
                    fVar8 = 0.0;
                  }
                  else {
                    fVar8 = fVar8 - *(float *)(iVar2 + 0x10);
                    fVar8 = fVar8 * fVar8;
                  }
                  fVar9 = *(float *)(param_2 + 4);
                  if (*(float *)(iVar2 + 8) <= fVar9) {
                    if (*(float *)(iVar2 + 0x14) < fVar9) {
                      fVar9 = fVar9 - *(float *)(iVar2 + 0x14);
                      fVar8 = fVar8 + fVar9 * fVar9;
                    }
                  }
                  else {
                    fVar9 = *(float *)(iVar2 + 8) - fVar9;
                    fVar8 = fVar8 + fVar9 * fVar9;
                  }
                  if (fVar8 < param_4) {
                    fVar10 = *(float *)(iVar2 + 0x2c) - *(float *)(this + 0x2c);
                    fVar8 = *(float *)(iVar2 + 0x34) - *(float *)(this + 0x34);
                    fVar9 = *(float *)(iVar2 + 0x30) - *(float *)(this + 0x30);
                    fVar8 = SQRT(fVar8 * fVar8 + fVar10 * fVar10 + fVar9 * fVar9) +
                            *(float *)(this + 0x44);
                    *(float *)(iVar2 + 0x44) = fVar8;
                    *(float *)(iVar2 + 0x40) = fVar8;
                    if (fVar8 < local_80c0) {
                      local_8058 = iVar2;
                      local_8054 = fVar8;
                      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_0098cdf5;
                    }
                  }
                }
                piVar5 = *(int **)(this + 0x6c);
              }
              iVar6 = iVar6 + 1;
            } while (iVar6 < *piVar5);
          }
          if ((param_5 & 8) == 0) {
            if ((CNavArea::GetElevatorAreas()::empty == '\0') &&
               (iVar6 = __cxa_guard_acquire(&CNavArea::GetElevatorAreas()::empty), iVar6 != 0)) {
              if ((CUtlVectorUltraConservative<NavConnect,CUtlVectorUltraConservativeAllocator>::
                   StaticData()::staticData == '\0') &&
                 (iVar6 = __cxa_guard_acquire(&CUtlVectorUltraConservative<NavConnect,CUtlVectorUltraConservativeAllocator>
                                               ::StaticData()::staticData), iVar6 != 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);
            }
            pCVar4 = this + 0x88;
            if (((byte)this[0x57] & 0x40) == 0) {
              pCVar4 = (CNavArea *)&CNavArea::GetElevatorAreas()::empty;
            }
            piVar5 = *(int **)pCVar4;
            if (0 < *piVar5) {
              iVar6 = 0;
              do {
                iVar2 = piVar5[iVar6 * 2 + 1];
                if (((iVar2 != 0) && (*(int *)(iVar2 + 0x3c) != CNavArea::m_masterMarker)) &&
                   (CNavArea::m_masterMarker != *(int *)(iVar2 + 0x50))) {
                  *(int *)(iVar2 + 0x3c) = CNavArea::m_masterMarker;
                  *(CNavArea **)(iVar2 + 0x78) = this;
                  *(byte *)(iVar2 + 0x7c) = *(byte *)(iVar2 + 0x7c) & 0xf0 | 9;
                  if (local_80c0 <= 0.0) {
                    *(undefined4 *)(iVar2 + 0x40) = 0;
                    *(undefined4 *)(iVar2 + 0x44) = 0;
                    local_803c = 0;
                    local_8040 = iVar2;
                    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_0098d002:
                    *(int *)(iVar2 + 0x50) = CNavArea::m_masterMarker;
                  }
                  else {
                    fVar8 = *(float *)param_2;
                    if (fVar8 < *(float *)(iVar2 + 4)) {
                      fVar8 = *(float *)(iVar2 + 4) - fVar8;
                      fVar8 = fVar8 * fVar8;
                    }
                    else if (fVar8 <= *(float *)(iVar2 + 0x10)) {
                      fVar8 = 0.0;
                    }
                    else {
                      fVar8 = fVar8 - *(float *)(iVar2 + 0x10);
                      fVar8 = fVar8 * fVar8;
                    }
                    fVar9 = *(float *)(param_2 + 4);
                    if (*(float *)(iVar2 + 8) <= fVar9) {
                      if (*(float *)(iVar2 + 0x14) < fVar9) {
                        fVar9 = fVar9 - *(float *)(iVar2 + 0x14);
                        fVar8 = fVar8 + fVar9 * fVar9;
                      }
                    }
                    else {
                      fVar9 = *(float *)(iVar2 + 8) - fVar9;
                      fVar8 = fVar8 + fVar9 * fVar9;
                    }
                    if (fVar8 < param_4) {
                      fVar10 = *(float *)(iVar2 + 0x2c) - *(float *)(this + 0x2c);
                      fVar8 = *(float *)(iVar2 + 0x30) - *(float *)(this + 0x30);
                      fVar9 = *(float *)(iVar2 + 0x34) - *(float *)(this + 0x34);
                      fVar8 = SQRT(fVar8 * fVar8 + fVar10 * fVar10 + fVar9 * fVar9) +
                              *(float *)(this + 0x44);
                      *(float *)(iVar2 + 0x44) = fVar8;
                      *(float *)(iVar2 + 0x40) = fVar8;
                      if (fVar8 < local_80c0) {
                        local_8048 = iVar2;
                        local_8044 = fVar8;
                        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_0098d002;
                      }
                    }
                  }
                  piVar5 = *(int **)pCVar4;
                }
                iVar6 = iVar6 + 1;
              } while (iVar6 < *piVar5);
            }
          }
        }
      }
    }
    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 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)