L L4D2node

SearchSurroundingAreas<CheckpointCollector>

0x0086e630 · 4067 bytes · __cdecl

_Z22SearchSurroundingAreasI19CheckpointCollectorEvP8CNavAreaRK6VectorRT_fji

Decompiled

void (6 params)

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

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

{
  CNavArea *this;
  undefined4 *puVar1;
  char cVar2;
  int iVar3;
  CNavArea *pCVar4;
  int *piVar5;
  int iVar6;
  int iVar7;
  int iVar8;
  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) {
    iVar7 = CNavArea::m_masterMarker + 1;
    CNavArea::m_masterMarker = 1;
    if (iVar7 != 0) {
      CNavArea::m_masterMarker = iVar7;
    }
    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 0086e6fc to 0086f599 has its CatchHandler @ 0086f60e */
      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;
    }
joined_r0x0086e757:
    if (0 < local_28) {
      this = (CNavArea *)*local_8038;
      CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
      ::RemoveAtHead((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
                      *)&local_8038);
      if (((((param_5 & 2) != 0) || (cVar2 = CNavArea::IsBlocked(this,param_6,false), cVar2 == '\0')
           ) && (((byte)this[0x12d] & 8) != 0)) &&
         ((*(float *)(this + 4) < *(float *)(this + 0x10) &&
          (*(float *)(this + 8) < *(float *)(this + 0x14))))) {
        puVar1 = *(undefined4 **)(param_3 + 4);
        iVar7 = puVar1[3];
        if (0 < iVar7) {
          piVar5 = (int *)*puVar1;
          iVar8 = 0;
          if (this != (CNavArea *)*piVar5) {
            do {
              iVar8 = iVar8 + 1;
              if (iVar8 == iVar7) goto joined_r0x0086e757;
            } while (this != (CNavArea *)piVar5[iVar8]);
            if (iVar8 == -1) goto joined_r0x0086e757;
          }
          iVar6 = (iVar7 - iVar8) + -1;
          if (0 < iVar6) {
            _V_memmove(piVar5 + iVar8,piVar5 + iVar8 + 1,iVar6 * 4);
            iVar7 = puVar1[3];
          }
          puVar1[3] = iVar7 + -1;
          Checkpoint::AddArea(*(Checkpoint **)param_3,(TerrorNavArea *)this);
          local_80c4 = this;
          do {
            piVar5 = *(int **)(local_80c4 + 0x58);
            iVar7 = *piVar5;
            if (0 < iVar7) {
              iVar6 = 0;
              iVar8 = iVar7;
              do {
                if (iVar8 < 1) {
LAB_0086e8a2:
                  pCVar4 = (CNavArea *)0x0;
                }
                else {
                  iVar3 = 0;
                  if (iVar6 != 0) {
                    do {
                      iVar3 = iVar3 + 1;
                      if (iVar3 == iVar8) goto LAB_0086e8a2;
                    } while (iVar3 != iVar6);
                  }
                  pCVar4 = (CNavArea *)piVar5[iVar3 * 2 + 1];
                }
                if ((((param_5 & 4) == 0) ||
                    (cVar2 = CNavArea::IsConnected(pCVar4,this,4), cVar2 != '\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) {
                    fVar9 = *(float *)param_2;
                    if (*(float *)(pCVar4 + 4) <= fVar9) {
                      if (fVar9 <= *(float *)(pCVar4 + 0x10)) {
                        fVar9 = 0.0;
                      }
                      else {
                        fVar9 = fVar9 - *(float *)(pCVar4 + 0x10);
                        fVar9 = fVar9 * fVar9;
                      }
                    }
                    else {
                      fVar9 = *(float *)(pCVar4 + 4) - fVar9;
                      fVar9 = fVar9 * fVar9;
                    }
                    fVar10 = *(float *)(param_2 + 4);
                    if (*(float *)(pCVar4 + 8) <= fVar10) {
                      if (*(float *)(pCVar4 + 0x14) < fVar10) {
                        fVar10 = fVar10 - *(float *)(pCVar4 + 0x14);
                        fVar9 = fVar9 + fVar10 * fVar10;
                      }
                    }
                    else {
                      fVar10 = *(float *)(pCVar4 + 8) - fVar10;
                      fVar9 = fVar9 + fVar10 * fVar10;
                    }
                    if (fVar9 < param_4) {
                      fVar9 = SQRT((*(float *)(pCVar4 + 0x30) - *(float *)(this + 0x30)) *
                                   (*(float *)(pCVar4 + 0x30) - *(float *)(this + 0x30)) +
                                   (*(float *)(pCVar4 + 0x34) - *(float *)(this + 0x34)) *
                                   (*(float *)(pCVar4 + 0x34) - *(float *)(this + 0x34)) +
                                   (*(float *)(pCVar4 + 0x2c) - *(float *)(this + 0x2c)) *
                                   (*(float *)(pCVar4 + 0x2c) - *(float *)(this + 0x2c))) +
                              *(float *)(this + 0x44);
                      *(float *)(pCVar4 + 0x44) = fVar9;
                      *(float *)(pCVar4 + 0x40) = fVar9;
                      if (fVar9 < local_80c0) {
                        local_80a8 = pCVar4;
                        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_0086ea68;
                      }
                    }
                  }
                  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_0086ea68:
                    *(int *)(pCVar4 + 0x50) = CNavArea::m_masterMarker;
                  }
                }
                if (iVar6 + 1 == iVar7) break;
                iVar6 = iVar6 + 1;
                piVar5 = *(int **)(local_80c4 + 0x58);
                iVar8 = *piVar5;
              } while( true );
            }
            local_80c4 = local_80c4 + 4;
          } while (local_80c4 != this + 0x10);
          local_80c4 = this;
          if ((param_5 & 1) != 0) {
            do {
              iVar7 = 0;
              piVar5 = *(int **)(local_80c4 + 0x114);
              if (0 < *piVar5) {
                do {
                  iVar8 = piVar5[iVar7 * 2 + 1];
                  if (((iVar8 != 0) && (*(int *)(iVar8 + 0x3c) != CNavArea::m_masterMarker)) &&
                     (CNavArea::m_masterMarker != *(int *)(iVar8 + 0x50))) {
                    *(int *)(iVar8 + 0x3c) = CNavArea::m_masterMarker;
                    *(CNavArea **)(iVar8 + 0x78) = this;
                    *(byte *)(iVar8 + 0x7c) = *(byte *)(iVar8 + 0x7c) & 0xf0 | 9;
                    if (local_80c0 <= 0.0) {
                      *(undefined4 *)(iVar8 + 0x40) = 0;
                      *(undefined4 *)(iVar8 + 0x44) = 0;
                      local_808c = 0;
                      local_8090 = iVar8;
                      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_0086ec62:
                      *(int *)(iVar8 + 0x50) = CNavArea::m_masterMarker;
                    }
                    else {
                      fVar9 = *(float *)param_2;
                      if (fVar9 < *(float *)(iVar8 + 4)) {
                        fVar9 = *(float *)(iVar8 + 4) - fVar9;
                        fVar9 = fVar9 * fVar9;
                      }
                      else if (fVar9 <= *(float *)(iVar8 + 0x10)) {
                        fVar9 = 0.0;
                      }
                      else {
                        fVar9 = fVar9 - *(float *)(iVar8 + 0x10);
                        fVar9 = fVar9 * fVar9;
                      }
                      fVar10 = *(float *)(param_2 + 4);
                      if (*(float *)(iVar8 + 8) <= fVar10) {
                        if (*(float *)(iVar8 + 0x14) < fVar10) {
                          fVar10 = fVar10 - *(float *)(iVar8 + 0x14);
                          fVar9 = fVar9 + fVar10 * fVar10;
                        }
                      }
                      else {
                        fVar10 = *(float *)(iVar8 + 8) - fVar10;
                        fVar9 = fVar9 + fVar10 * fVar10;
                      }
                      if (fVar9 < param_4) {
                        fVar11 = *(float *)(iVar8 + 0x30) - *(float *)(this + 0x30);
                        fVar9 = *(float *)(iVar8 + 0x34) - *(float *)(this + 0x34);
                        fVar10 = *(float *)(iVar8 + 0x2c) - *(float *)(this + 0x2c);
                        fVar9 = SQRT(fVar9 * fVar9 + fVar11 * fVar11 + fVar10 * fVar10) +
                                *(float *)(this + 0x44);
                        *(float *)(iVar8 + 0x44) = fVar9;
                        *(float *)(iVar8 + 0x40) = fVar9;
                        if (fVar9 < local_80c0) {
                          local_8098 = iVar8;
                          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_0086ec62;
                        }
                      }
                    }
                    piVar5 = *(int **)(local_80c4 + 0x114);
                  }
                  iVar7 = iVar7 + 1;
                } while (iVar7 < *piVar5);
              }
              local_80c4 = local_80c4 + 4;
            } while (this + 0x10 != local_80c4);
          }
          local_80c4 = (CNavArea *)0x0;
          piVar5 = *(int **)(this + 0x68);
          if (0 < *piVar5) {
            do {
              iVar7 = piVar5[(int)local_80c4 + 1];
              iVar8 = *(int *)(iVar7 + 0x24);
              if (((iVar8 != 0) && (*(int *)(iVar8 + 0x3c) != CNavArea::m_masterMarker)) &&
                 (CNavArea::m_masterMarker != *(int *)(iVar8 + 0x50))) {
                *(int *)(iVar8 + 0x3c) = CNavArea::m_masterMarker;
                *(CNavArea **)(iVar8 + 0x78) = this;
                *(byte *)(iVar8 + 0x7c) = *(byte *)(iVar8 + 0x7c) & 0xf0 | 9;
                if (local_80c0 <= 0.0) {
                  *(undefined4 *)(iVar8 + 0x40) = 0;
                  *(undefined4 *)(iVar8 + 0x44) = 0;
                  local_807c = 0;
                  local_8080 = iVar8;
                  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_0086f121:
                  *(int *)(iVar8 + 0x50) = CNavArea::m_masterMarker;
                }
                else {
                  fVar9 = *(float *)param_2;
                  if (fVar9 < *(float *)(iVar8 + 4)) {
                    fVar9 = *(float *)(iVar8 + 4) - fVar9;
                    fVar9 = fVar9 * fVar9;
                  }
                  else if (fVar9 <= *(float *)(iVar8 + 0x10)) {
                    fVar9 = 0.0;
                  }
                  else {
                    fVar9 = fVar9 - *(float *)(iVar8 + 0x10);
                    fVar9 = fVar9 * fVar9;
                  }
                  fVar10 = *(float *)(param_2 + 4);
                  if (*(float *)(iVar8 + 8) <= fVar10) {
                    if (*(float *)(iVar8 + 0x14) < fVar10) {
                      fVar10 = fVar10 - *(float *)(iVar8 + 0x14);
                      fVar9 = fVar9 + fVar10 * fVar10;
                    }
                  }
                  else {
                    fVar10 = *(float *)(iVar8 + 8) - fVar10;
                    fVar9 = fVar9 + fVar10 * fVar10;
                  }
                  if (fVar9 < param_4) {
                    fVar9 = *(float *)(iVar8 + 0x2c) - *(float *)(this + 0x2c);
                    fVar11 = *(float *)(iVar8 + 0x34) - *(float *)(this + 0x34);
                    fVar10 = *(float *)(iVar8 + 0x30) - *(float *)(this + 0x30);
                    fVar9 = SQRT(fVar9 * fVar9 + fVar11 * fVar11 + fVar10 * fVar10) +
                            *(float *)(this + 0x44);
                    *(float *)(iVar8 + 0x44) = fVar9;
                    *(float *)(iVar8 + 0x40) = fVar9;
                    if (fVar9 < local_80c0) {
                      local_8088 = iVar8;
                      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_0086f121;
                    }
                  }
                }
              }
              iVar8 = *(int *)(iVar7 + 0x28);
              if (((iVar8 != 0) && (*(int *)(iVar8 + 0x3c) != CNavArea::m_masterMarker)) &&
                 (CNavArea::m_masterMarker != *(int *)(iVar8 + 0x50))) {
                *(int *)(iVar8 + 0x3c) = CNavArea::m_masterMarker;
                *(CNavArea **)(iVar8 + 0x78) = this;
                *(byte *)(iVar8 + 0x7c) = *(byte *)(iVar8 + 0x7c) & 0xf0 | 9;
                if (local_80c0 <= 0.0) {
                  *(undefined4 *)(iVar8 + 0x40) = 0;
                  *(undefined4 *)(iVar8 + 0x44) = 0;
                  local_806c = 0;
                  local_8070 = iVar8;
                  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_0086f0de:
                  *(int *)(iVar8 + 0x50) = CNavArea::m_masterMarker;
                }
                else {
                  fVar9 = *(float *)param_2;
                  if (*(float *)(iVar8 + 4) <= fVar9) {
                    if (fVar9 <= *(float *)(iVar8 + 0x10)) {
                      fVar9 = 0.0;
                    }
                    else {
                      fVar9 = fVar9 - *(float *)(iVar8 + 0x10);
                      fVar9 = fVar9 * fVar9;
                    }
                  }
                  else {
                    fVar9 = *(float *)(iVar8 + 4) - fVar9;
                    fVar9 = fVar9 * fVar9;
                  }
                  fVar10 = *(float *)(param_2 + 4);
                  if (*(float *)(iVar8 + 8) <= fVar10) {
                    if (*(float *)(iVar8 + 0x14) < fVar10) {
                      fVar10 = fVar10 - *(float *)(iVar8 + 0x14);
                      fVar9 = fVar9 + fVar10 * fVar10;
                    }
                  }
                  else {
                    fVar10 = *(float *)(iVar8 + 8) - fVar10;
                    fVar9 = fVar9 + fVar10 * fVar10;
                  }
                  if (fVar9 < param_4) {
                    fVar9 = *(float *)(iVar8 + 0x2c) - *(float *)(this + 0x2c);
                    fVar11 = *(float *)(iVar8 + 0x34) - *(float *)(this + 0x34);
                    fVar10 = *(float *)(iVar8 + 0x30) - *(float *)(this + 0x30);
                    fVar9 = SQRT(fVar9 * fVar9 + fVar11 * fVar11 + fVar10 * fVar10) +
                            *(float *)(this + 0x44);
                    *(float *)(iVar8 + 0x44) = fVar9;
                    *(float *)(iVar8 + 0x40) = fVar9;
                    if (fVar9 < local_80c0) {
                      local_8078 = iVar8;
                      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_0086f0de;
                    }
                  }
                }
              }
              iVar7 = *(int *)(iVar7 + 0x2c);
              if (((iVar7 != 0) && (*(int *)(iVar7 + 0x3c) != CNavArea::m_masterMarker)) &&
                 (CNavArea::m_masterMarker != *(int *)(iVar7 + 0x50))) {
                *(int *)(iVar7 + 0x3c) = CNavArea::m_masterMarker;
                *(CNavArea **)(iVar7 + 0x78) = this;
                *(byte *)(iVar7 + 0x7c) = *(byte *)(iVar7 + 0x7c) & 0xf0 | 9;
                if (local_80c0 <= 0.0) {
                  *(undefined4 *)(iVar7 + 0x40) = 0;
                  *(undefined4 *)(iVar7 + 0x44) = 0;
                  local_805c = 0;
                  local_8060 = iVar7;
                  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_0086f09b:
                  *(int *)(iVar7 + 0x50) = CNavArea::m_masterMarker;
                }
                else {
                  fVar9 = *(float *)param_2;
                  if (*(float *)(iVar7 + 4) <= fVar9) {
                    if (fVar9 <= *(float *)(iVar7 + 0x10)) {
                      fVar9 = 0.0;
                    }
                    else {
                      fVar9 = fVar9 - *(float *)(iVar7 + 0x10);
                      fVar9 = fVar9 * fVar9;
                    }
                  }
                  else {
                    fVar9 = *(float *)(iVar7 + 4) - fVar9;
                    fVar9 = fVar9 * fVar9;
                  }
                  fVar10 = *(float *)(param_2 + 4);
                  if (*(float *)(iVar7 + 8) <= fVar10) {
                    if (*(float *)(iVar7 + 0x14) < fVar10) {
                      fVar10 = fVar10 - *(float *)(iVar7 + 0x14);
                      fVar9 = fVar9 + fVar10 * fVar10;
                    }
                  }
                  else {
                    fVar10 = *(float *)(iVar7 + 8) - fVar10;
                    fVar9 = fVar9 + fVar10 * fVar10;
                  }
                  if (fVar9 < param_4) {
                    fVar9 = *(float *)(iVar7 + 0x30) - *(float *)(this + 0x30);
                    fVar11 = *(float *)(iVar7 + 0x34) - *(float *)(this + 0x34);
                    fVar10 = *(float *)(iVar7 + 0x2c) - *(float *)(this + 0x2c);
                    fVar9 = SQRT(fVar9 * fVar9 + fVar11 * fVar11 + fVar10 * fVar10) +
                            *(float *)(this + 0x44);
                    *(float *)(iVar7 + 0x44) = fVar9;
                    *(float *)(iVar7 + 0x40) = fVar9;
                    if (fVar9 < local_80c0) {
                      local_8068 = iVar7;
                      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_0086f09b;
                    }
                  }
                }
              }
              local_80c4 = (CNavArea *)((int)local_80c4 + 1);
              piVar5 = *(int **)(this + 0x68);
            } while ((int)local_80c4 < *piVar5);
          }
          piVar5 = *(int **)(this + 0x6c);
          iVar7 = 0;
          if (0 < *piVar5) {
            do {
              iVar8 = *(int *)(piVar5[iVar7 + 1] + 0x34);
              if (((iVar8 != 0) && (*(int *)(iVar8 + 0x3c) != CNavArea::m_masterMarker)) &&
                 (CNavArea::m_masterMarker != *(int *)(iVar8 + 0x50))) {
                *(int *)(iVar8 + 0x3c) = CNavArea::m_masterMarker;
                *(CNavArea **)(iVar8 + 0x78) = this;
                *(byte *)(iVar8 + 0x7c) = *(byte *)(iVar8 + 0x7c) & 0xf0 | 9;
                if (local_80c0 <= 0.0) {
                  *(undefined4 *)(iVar8 + 0x40) = 0;
                  *(undefined4 *)(iVar8 + 0x44) = 0;
                  local_804c = 0;
                  local_8050 = iVar8;
                  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_0086f355:
                  *(int *)(iVar8 + 0x50) = CNavArea::m_masterMarker;
                }
                else {
                  fVar9 = *(float *)param_2;
                  if (fVar9 < *(float *)(iVar8 + 4)) {
                    fVar9 = *(float *)(iVar8 + 4) - fVar9;
                    fVar9 = fVar9 * fVar9;
                  }
                  else if (fVar9 <= *(float *)(iVar8 + 0x10)) {
                    fVar9 = 0.0;
                  }
                  else {
                    fVar9 = fVar9 - *(float *)(iVar8 + 0x10);
                    fVar9 = fVar9 * fVar9;
                  }
                  fVar10 = *(float *)(param_2 + 4);
                  if (*(float *)(iVar8 + 8) <= fVar10) {
                    if (*(float *)(iVar8 + 0x14) < fVar10) {
                      fVar10 = fVar10 - *(float *)(iVar8 + 0x14);
                      fVar9 = fVar9 + fVar10 * fVar10;
                    }
                  }
                  else {
                    fVar10 = *(float *)(iVar8 + 8) - fVar10;
                    fVar9 = fVar9 + fVar10 * fVar10;
                  }
                  if (fVar9 < param_4) {
                    fVar9 = *(float *)(iVar8 + 0x2c) - *(float *)(this + 0x2c);
                    fVar11 = *(float *)(iVar8 + 0x30) - *(float *)(this + 0x30);
                    fVar10 = *(float *)(iVar8 + 0x34) - *(float *)(this + 0x34);
                    fVar9 = SQRT(fVar9 * fVar9 + fVar11 * fVar11 + fVar10 * fVar10) +
                            *(float *)(this + 0x44);
                    *(float *)(iVar8 + 0x44) = fVar9;
                    *(float *)(iVar8 + 0x40) = fVar9;
                    if (fVar9 < local_80c0) {
                      local_8058 = iVar8;
                      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_0086f355;
                    }
                  }
                }
                piVar5 = *(int **)(this + 0x6c);
              }
              iVar7 = iVar7 + 1;
            } while (iVar7 < *piVar5);
          }
          if ((param_5 & 8) == 0) {
            if ((CNavArea::GetElevatorAreas()::empty == '\0') &&
               (iVar7 = __cxa_guard_acquire(&CNavArea::GetElevatorAreas()::empty), iVar7 != 0)) {
              if ((CUtlVectorUltraConservative<NavConnect,CUtlVectorUltraConservativeAllocator>::
                   StaticData()::staticData == '\0') &&
                 (iVar7 = __cxa_guard_acquire(&CUtlVectorUltraConservative<NavConnect,CUtlVectorUltraConservativeAllocator>
                                               ::StaticData()::staticData), iVar7 != 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) {
              iVar7 = 0;
              do {
                iVar8 = piVar5[iVar7 * 2 + 1];
                if (((iVar8 != 0) && (*(int *)(iVar8 + 0x3c) != CNavArea::m_masterMarker)) &&
                   (CNavArea::m_masterMarker != *(int *)(iVar8 + 0x50))) {
                  *(int *)(iVar8 + 0x3c) = CNavArea::m_masterMarker;
                  *(CNavArea **)(iVar8 + 0x78) = this;
                  *(byte *)(iVar8 + 0x7c) = *(byte *)(iVar8 + 0x7c) & 0xf0 | 9;
                  if (local_80c0 <= 0.0) {
                    *(undefined4 *)(iVar8 + 0x40) = 0;
                    *(undefined4 *)(iVar8 + 0x44) = 0;
                    local_803c = 0;
                    local_8040 = iVar8;
                    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_0086f53e:
                    *(int *)(iVar8 + 0x50) = CNavArea::m_masterMarker;
                  }
                  else {
                    fVar9 = *(float *)param_2;
                    if (fVar9 < *(float *)(iVar8 + 4)) {
                      fVar9 = *(float *)(iVar8 + 4) - fVar9;
                      fVar9 = fVar9 * fVar9;
                    }
                    else if (fVar9 <= *(float *)(iVar8 + 0x10)) {
                      fVar9 = 0.0;
                    }
                    else {
                      fVar9 = fVar9 - *(float *)(iVar8 + 0x10);
                      fVar9 = fVar9 * fVar9;
                    }
                    fVar10 = *(float *)(param_2 + 4);
                    if (*(float *)(iVar8 + 8) <= fVar10) {
                      if (*(float *)(iVar8 + 0x14) < fVar10) {
                        fVar10 = fVar10 - *(float *)(iVar8 + 0x14);
                        fVar9 = fVar9 + fVar10 * fVar10;
                      }
                    }
                    else {
                      fVar10 = *(float *)(iVar8 + 8) - fVar10;
                      fVar9 = fVar9 + fVar10 * fVar10;
                    }
                    if (fVar9 < param_4) {
                      fVar9 = *(float *)(iVar8 + 0x2c) - *(float *)(this + 0x2c);
                      fVar11 = *(float *)(iVar8 + 0x34) - *(float *)(this + 0x34);
                      fVar10 = *(float *)(iVar8 + 0x30) - *(float *)(this + 0x30);
                      fVar9 = SQRT(fVar9 * fVar9 + fVar11 * fVar11 + fVar10 * fVar10) +
                              *(float *)(this + 0x44);
                      *(float *)(iVar8 + 0x44) = fVar9;
                      *(float *)(iVar8 + 0x40) = fVar9;
                      if (fVar9 < local_80c0) {
                        local_8048 = iVar8;
                        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_0086f53e;
                      }
                    }
                  }
                  piVar5 = *(int **)pCVar4;
                }
                iVar7 = iVar7 + 1;
              } while (iVar7 < *piVar5);
            }
          }
        }
      }
      goto joined_r0x0086e757;
    }
    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)