L L4D2node

SearchSurroundingAreas<EscapeScan>

0x00a72430 · 3964 bytes · __cdecl

_Z22SearchSurroundingAreasI10EscapeScanEvP8CNavAreaRK6VectorRT_fji

Decompiled

void (6 params)

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

void SearchSurroundingAreas<EscapeScan>
               (CNavArea *param_1,Vector *param_2,EscapeScan *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;
  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) {
    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 00a724fc to 00a7332d has its CatchHandler @ 00a733a2 */
      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'))
         && (cVar1 = EscapeScan::operator()(param_3,this), cVar1 != '\0')) {
        local_80c4 = this;
        do {
          piVar4 = *(int **)(local_80c4 + 0x58);
          iVar5 = *piVar4;
          if (0 < iVar5) {
            iVar7 = 0;
            iVar6 = iVar5;
            do {
              if (iVar6 < 1) {
LAB_00a72602:
                pCVar3 = (CNavArea *)0x0;
              }
              else {
                iVar2 = 0;
                if (iVar7 != 0) {
                  do {
                    iVar2 = iVar2 + 1;
                    if (iVar2 == iVar6) goto LAB_00a72602;
                  } 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) {
                  fVar8 = *(float *)param_2;
                  if (*(float *)(pCVar3 + 4) <= fVar8) {
                    if (fVar8 <= *(float *)(pCVar3 + 0x10)) {
                      fVar8 = 0.0;
                    }
                    else {
                      fVar8 = fVar8 - *(float *)(pCVar3 + 0x10);
                      fVar8 = fVar8 * fVar8;
                    }
                  }
                  else {
                    fVar8 = *(float *)(pCVar3 + 4) - fVar8;
                    fVar8 = fVar8 * fVar8;
                  }
                  fVar9 = *(float *)(param_2 + 4);
                  if (*(float *)(pCVar3 + 8) <= fVar9) {
                    if (*(float *)(pCVar3 + 0x14) < fVar9) {
                      fVar9 = fVar9 - *(float *)(pCVar3 + 0x14);
                      fVar8 = fVar8 + fVar9 * fVar9;
                    }
                  }
                  else {
                    fVar9 = *(float *)(pCVar3 + 8) - fVar9;
                    fVar8 = fVar8 + fVar9 * fVar9;
                  }
                  if (fVar8 < param_4) {
                    fVar8 = SQRT((*(float *)(pCVar3 + 0x34) - *(float *)(this + 0x34)) *
                                 (*(float *)(pCVar3 + 0x34) - *(float *)(this + 0x34)) +
                                 (*(float *)(pCVar3 + 0x2c) - *(float *)(this + 0x2c)) *
                                 (*(float *)(pCVar3 + 0x2c) - *(float *)(this + 0x2c)) +
                                 (*(float *)(pCVar3 + 0x30) - *(float *)(this + 0x30)) *
                                 (*(float *)(pCVar3 + 0x30) - *(float *)(this + 0x30))) +
                            *(float *)(this + 0x44);
                    *(float *)(pCVar3 + 0x44) = fVar8;
                    *(float *)(pCVar3 + 0x40) = fVar8;
                    if (fVar8 < local_80c0) {
                      local_80a8 = pCVar3;
                      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_00a727c8;
                    }
                  }
                }
                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_00a727c8:
                  *(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_00a729c2:
                    *(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
                  }
                  else {
                    fVar8 = *(float *)param_2;
                    if (fVar8 < *(float *)(iVar6 + 4)) {
                      fVar8 = *(float *)(iVar6 + 4) - fVar8;
                      fVar8 = fVar8 * fVar8;
                    }
                    else if (fVar8 <= *(float *)(iVar6 + 0x10)) {
                      fVar8 = 0.0;
                    }
                    else {
                      fVar8 = fVar8 - *(float *)(iVar6 + 0x10);
                      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) {
                      fVar10 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
                      fVar8 = *(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_8098 = iVar6;
                        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_00a729c2;
                      }
                    }
                  }
                  piVar4 = *(int **)(local_80c4 + 0x114);
                }
                iVar5 = iVar5 + 1;
              } while (iVar5 < *piVar4);
            }
            local_80c4 = local_80c4 + 4;
          } while (local_80c4 != this + 0x10);
        }
        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_00a72e5b:
                *(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
              }
              else {
                fVar8 = *(float *)param_2;
                if (fVar8 < *(float *)(iVar6 + 4)) {
                  fVar8 = *(float *)(iVar6 + 4) - fVar8;
                  fVar8 = fVar8 * fVar8;
                }
                else if (fVar8 <= *(float *)(iVar6 + 0x10)) {
                  fVar8 = 0.0;
                }
                else {
                  fVar8 = fVar8 - *(float *)(iVar6 + 0x10);
                  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_8088 = iVar6;
                    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_00a72e5b;
                  }
                }
              }
            }
            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_00a72e9e:
                *(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_8078 = iVar6;
                    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_00a72e9e;
                  }
                }
              }
            }
            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_00a72ee1:
                *(int *)(iVar5 + 0x50) = CNavArea::m_masterMarker;
              }
              else {
                fVar8 = *(float *)param_2;
                if (*(float *)(iVar5 + 4) <= fVar8) {
                  if (fVar8 <= *(float *)(iVar5 + 0x10)) {
                    fVar8 = 0.0;
                  }
                  else {
                    fVar8 = fVar8 - *(float *)(iVar5 + 0x10);
                    fVar8 = fVar8 * fVar8;
                  }
                }
                else {
                  fVar8 = *(float *)(iVar5 + 4) - fVar8;
                  fVar8 = fVar8 * fVar8;
                }
                fVar9 = *(float *)(param_2 + 4);
                if (*(float *)(iVar5 + 8) <= fVar9) {
                  if (*(float *)(iVar5 + 0x14) < fVar9) {
                    fVar9 = fVar9 - *(float *)(iVar5 + 0x14);
                    fVar8 = fVar8 + fVar9 * fVar9;
                  }
                }
                else {
                  fVar9 = *(float *)(iVar5 + 8) - fVar9;
                  fVar8 = fVar8 + fVar9 * fVar9;
                }
                if (fVar8 < param_4) {
                  fVar8 = *(float *)(iVar5 + 0x30) - *(float *)(this + 0x30);
                  fVar10 = *(float *)(iVar5 + 0x34) - *(float *)(this + 0x34);
                  fVar9 = *(float *)(iVar5 + 0x2c) - *(float *)(this + 0x2c);
                  fVar8 = SQRT(fVar8 * fVar8 + fVar10 * fVar10 + fVar9 * fVar9) +
                          *(float *)(this + 0x44);
                  *(float *)(iVar5 + 0x44) = fVar8;
                  *(float *)(iVar5 + 0x40) = fVar8;
                  if (fVar8 < local_80c0) {
                    local_8068 = iVar5;
                    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_00a72ee1;
                  }
                }
              }
            }
            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_00a7311c:
                *(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
              }
              else {
                fVar8 = *(float *)param_2;
                if (fVar8 < *(float *)(iVar6 + 4)) {
                  fVar8 = *(float *)(iVar6 + 4) - fVar8;
                  fVar8 = fVar8 * fVar8;
                }
                else if (fVar8 <= *(float *)(iVar6 + 0x10)) {
                  fVar8 = 0.0;
                }
                else {
                  fVar8 = fVar8 - *(float *)(iVar6 + 0x10);
                  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) {
                  fVar10 = *(float *)(iVar6 + 0x2c) - *(float *)(this + 0x2c);
                  fVar8 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
                  fVar9 = *(float *)(iVar6 + 0x34) - *(float *)(this + 0x34);
                  fVar8 = SQRT(fVar8 * fVar8 + fVar10 * fVar10 + fVar9 * fVar9) +
                          *(float *)(this + 0x44);
                  *(float *)(iVar6 + 0x44) = fVar8;
                  *(float *)(iVar6 + 0x40) = fVar8;
                  if (fVar8 < local_80c0) {
                    local_8058 = iVar6;
                    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_00a7311c;
                  }
                }
              }
              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_00a732fb:
                  *(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
                }
                else {
                  fVar8 = *(float *)param_2;
                  if (fVar8 < *(float *)(iVar6 + 4)) {
                    fVar8 = *(float *)(iVar6 + 4) - fVar8;
                    fVar8 = fVar8 * fVar8;
                  }
                  else if (fVar8 <= *(float *)(iVar6 + 0x10)) {
                    fVar8 = 0.0;
                  }
                  else {
                    fVar8 = fVar8 - *(float *)(iVar6 + 0x10);
                    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) {
                    fVar10 = *(float *)(iVar6 + 0x2c) - *(float *)(this + 0x2c);
                    fVar8 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
                    fVar9 = *(float *)(iVar6 + 0x34) - *(float *)(this + 0x34);
                    fVar8 = SQRT(fVar8 * fVar8 + fVar10 * fVar10 + fVar9 * fVar9) +
                            *(float *)(this + 0x44);
                    *(float *)(iVar6 + 0x44) = fVar8;
                    *(float *)(iVar6 + 0x40) = fVar8;
                    if (fVar8 < local_80c0) {
                      local_8048 = iVar6;
                      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_00a732fb;
                    }
                  }
                }
                piVar4 = *(int **)pCVar3;
              }
              iVar5 = iVar5 + 1;
            } while (iVar5 < *piVar4);
          }
        }
      }
    }
    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)