L L4D2node

SearchSurroundingAreas<BoundarySpreadScan>

0x0098b050 · 4243 bytes · __cdecl

_Z22SearchSurroundingAreasI18BoundarySpreadScanEvP8CNavAreaRK6VectorRT_fji

Decompiled

void (6 params)

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

void SearchSurroundingAreas<BoundarySpreadScan>
               (CNavArea *param_1,Vector *param_2,BoundarySpreadScan *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;
  longdouble lVar8;
  float fVar9;
  float fVar10;
  float fVar11;
  CNavArea *local_80c4;
  float local_80c0;
  CNavArea *local_80b0;
  undefined4 local_80ac;
  CNavArea *local_80a8;
  float local_80a4;
  CNavArea *local_80a0;
  undefined4 local_809c;
  int local_8098;
  float local_8094;
  int local_8090;
  undefined4 local_808c;
  int local_8088;
  float local_8084;
  int local_8080;
  undefined4 local_807c;
  int local_8078;
  float local_8074;
  int local_8070;
  undefined4 local_806c;
  int local_8068;
  float local_8064;
  int local_8060;
  undefined4 local_805c;
  int local_8058;
  float local_8054;
  int local_8050;
  undefined4 local_804c;
  int local_8048;
  float local_8044;
  int local_8040;
  undefined4 local_803c;
  undefined4 *local_8038;
  undefined4 local_8034;
  undefined4 local_8030;
  undefined4 local_802c;
  undefined4 local_8028 [8192];
  int local_28;
  undefined4 *local_24;
  undefined4 local_20;
  
  if (param_1 == (CNavArea *)0x0) {
    return;
  }
  iVar5 = CNavArea::m_masterMarker + 1;
  CNavArea::m_masterMarker = 1;
  if (iVar5 != 0) {
    CNavArea::m_masterMarker = iVar5;
  }
  CNavArea::ClearSearchLists();
  local_8038 = local_8028;
  local_8034 = 0x1000;
  local_8030 = 0xffffffff;
  local_802c = 0;
  local_28 = 0;
  local_20 = 0;
  local_24 = local_8038;
  if ((*(int *)(param_1 + 0x3c) != CNavArea::m_masterMarker) &&
     (CNavArea::m_masterMarker != *(int *)(param_1 + 0x50))) {
    *(int *)(param_1 + 0x3c) = CNavArea::m_masterMarker;
    *(undefined4 *)(param_1 + 0x78) = 0;
    *(undefined4 *)(param_1 + 0x40) = 0;
    *(undefined4 *)(param_1 + 0x44) = 0;
    local_80b0 = param_1;
    local_80ac = 0;
    param_1[0x7c] = (CNavArea)((byte)param_1[0x7c] & 0xf0 | 9);
                    /* try { // try from 0098b11c to 0098c067 has its CatchHandler @ 0098c0ba */
    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;
  }
LAB_0098b1b5:
  do {
    if (local_28 < 1) {
      local_28 = 0;
      CUtlMemory<OpenListInfo_t,int>::Purge((CUtlMemory<OpenListInfo_t,int> *)&local_8038);
      local_24 = local_8038;
      CUtlMemory<OpenListInfo_t,int>::Purge((CUtlMemory<OpenListInfo_t,int> *)&local_8038);
      return;
    }
    this = (CNavArea *)*local_8038;
    CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
    ::RemoveAtHead((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
                    *)&local_8038);
  } while (((param_5 & 2) == 0) && (cVar1 = CNavArea::IsBlocked(this,param_6,false), cVar1 != '\0'))
  ;
  cVar1 = TerrorNavArea::IsCleared((TerrorNavArea *)this,(CTerrorPlayer *)0x0);
  if (cVar1 != '\0') goto LAB_0098b178;
  goto LAB_0098b210;
LAB_0098b178:
  fVar11 = 0.0;
  fVar9 = *(float *)(this + 0x44);
  fVar10 = *(float *)(ZombieBoundarySpreadSpeed._28_4_ + 0x2c);
  if ((this[0x145] != (CNavArea)0x0) && (this[0x7d] == (CNavArea)0x0)) {
    if (0.0 < *(float *)(this + 0x14c)) {
      lVar8 = (longdouble)IntervalTimer::Now();
      fVar11 = (float)lVar8 - *(float *)(this + 0x14c);
    }
    else {
      fVar11 = 99999.9;
    }
  }
  if (fVar9 / fVar10 < fVar11) {
    TerrorNavArea::MarkAreaNotCleared((TerrorNavArea *)this);
    if (*(int *)(ZombieShowClear._28_4_ + 0x30) != 0) {
      (**(code **)(*(int *)this + 0x54))(this,0xff,100,0,0xff,0x3f800000,1);
      NDebugOverlay::Line((Vector *)(*(int *)param_3 + 0x2c),(Vector *)(this + 0x2c),0xff,0xff,0,
                          true,1.0);
    }
LAB_0098b210:
    local_80c4 = this;
    do {
      piVar4 = *(int **)(local_80c4 + 0x58);
      iVar5 = *piVar4;
      if (0 < iVar5) {
        iVar7 = 0;
        iVar6 = iVar5;
        do {
          if (iVar6 < 1) {
LAB_0098b262:
            pCVar3 = (CNavArea *)0x0;
          }
          else {
            iVar2 = 0;
            if (iVar7 != 0) {
              do {
                iVar2 = iVar2 + 1;
                if (iVar2 == iVar6) goto LAB_0098b262;
              } while (iVar2 != iVar7);
            }
            pCVar3 = (CNavArea *)piVar4[iVar2 * 2 + 1];
          }
          if (((((param_5 & 4) == 0) ||
               (cVar1 = CNavArea::IsConnected(pCVar3,this,4), cVar1 != '\0')) &&
              (pCVar3 != (CNavArea *)0x0)) &&
             ((*(int *)(pCVar3 + 0x3c) != CNavArea::m_masterMarker &&
              (CNavArea::m_masterMarker != *(int *)(pCVar3 + 0x50))))) {
            *(int *)(pCVar3 + 0x3c) = CNavArea::m_masterMarker;
            *(CNavArea **)(pCVar3 + 0x78) = this;
            pCVar3[0x7c] = (CNavArea)((byte)pCVar3[0x7c] & 0xf0 | 9);
            if (0.0 < local_80c0) {
              fVar9 = *(float *)param_2;
              if (*(float *)(pCVar3 + 4) <= fVar9) {
                if (fVar9 <= *(float *)(pCVar3 + 0x10)) {
                  fVar9 = 0.0;
                }
                else {
                  fVar9 = fVar9 - *(float *)(pCVar3 + 0x10);
                  fVar9 = fVar9 * fVar9;
                }
              }
              else {
                fVar9 = *(float *)(pCVar3 + 4) - fVar9;
                fVar9 = fVar9 * fVar9;
              }
              fVar10 = *(float *)(param_2 + 4);
              if (*(float *)(pCVar3 + 8) <= fVar10) {
                if (*(float *)(pCVar3 + 0x14) < fVar10) {
                  fVar10 = fVar10 - *(float *)(pCVar3 + 0x14);
                  fVar9 = fVar9 + fVar10 * fVar10;
                }
              }
              else {
                fVar10 = *(float *)(pCVar3 + 8) - fVar10;
                fVar9 = fVar9 + fVar10 * fVar10;
              }
              if (fVar9 < param_4) {
                fVar9 = 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) = fVar9;
                *(float *)(pCVar3 + 0x40) = fVar9;
                if (fVar9 < local_80c0) {
                  local_80a8 = pCVar3;
                  local_80a4 = fVar9;
                  CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
                  ::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
                            *)&local_8038,(OpenListInfo_t *)&local_80a8);
                  goto LAB_0098b428;
                }
              }
            }
            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_0098b428:
              *(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_0098b622:
                *(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
              }
              else {
                fVar9 = *(float *)param_2;
                if (fVar9 < *(float *)(iVar6 + 4)) {
                  fVar9 = *(float *)(iVar6 + 4) - fVar9;
                  fVar9 = fVar9 * fVar9;
                }
                else if (fVar9 <= *(float *)(iVar6 + 0x10)) {
                  fVar9 = 0.0;
                }
                else {
                  fVar9 = fVar9 - *(float *)(iVar6 + 0x10);
                  fVar9 = fVar9 * fVar9;
                }
                fVar10 = *(float *)(param_2 + 4);
                if (*(float *)(iVar6 + 8) <= fVar10) {
                  if (*(float *)(iVar6 + 0x14) < fVar10) {
                    fVar10 = fVar10 - *(float *)(iVar6 + 0x14);
                    fVar9 = fVar9 + fVar10 * fVar10;
                  }
                }
                else {
                  fVar10 = *(float *)(iVar6 + 8) - fVar10;
                  fVar9 = fVar9 + fVar10 * fVar10;
                }
                if (fVar9 < param_4) {
                  fVar11 = *(float *)(iVar6 + 0x2c) - *(float *)(this + 0x2c);
                  fVar9 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
                  fVar10 = *(float *)(iVar6 + 0x34) - *(float *)(this + 0x34);
                  fVar9 = SQRT(fVar9 * fVar9 + fVar11 * fVar11 + fVar10 * fVar10) +
                          *(float *)(this + 0x44);
                  *(float *)(iVar6 + 0x44) = fVar9;
                  *(float *)(iVar6 + 0x40) = fVar9;
                  if (fVar9 < local_80c0) {
                    local_8098 = iVar6;
                    local_8094 = fVar9;
                    CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
                    ::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
                              *)&local_8038,(OpenListInfo_t *)&local_8098);
                    goto LAB_0098b622;
                  }
                }
              }
              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_0098baf1:
            *(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
          }
          else {
            fVar9 = *(float *)param_2;
            if (fVar9 < *(float *)(iVar6 + 4)) {
              fVar9 = *(float *)(iVar6 + 4) - fVar9;
              fVar9 = fVar9 * fVar9;
            }
            else if (fVar9 <= *(float *)(iVar6 + 0x10)) {
              fVar9 = 0.0;
            }
            else {
              fVar9 = fVar9 - *(float *)(iVar6 + 0x10);
              fVar9 = fVar9 * fVar9;
            }
            fVar10 = *(float *)(param_2 + 4);
            if (*(float *)(iVar6 + 8) <= fVar10) {
              if (*(float *)(iVar6 + 0x14) < fVar10) {
                fVar10 = fVar10 - *(float *)(iVar6 + 0x14);
                fVar9 = fVar9 + fVar10 * fVar10;
              }
            }
            else {
              fVar10 = *(float *)(iVar6 + 8) - fVar10;
              fVar9 = fVar9 + fVar10 * fVar10;
            }
            if (fVar9 < param_4) {
              fVar11 = *(float *)(iVar6 + 0x2c) - *(float *)(this + 0x2c);
              fVar9 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
              fVar10 = *(float *)(iVar6 + 0x34) - *(float *)(this + 0x34);
              fVar9 = SQRT(fVar9 * fVar9 + fVar11 * fVar11 + fVar10 * fVar10) +
                      *(float *)(this + 0x44);
              *(float *)(iVar6 + 0x44) = fVar9;
              *(float *)(iVar6 + 0x40) = fVar9;
              if (fVar9 < local_80c0) {
                local_8088 = iVar6;
                local_8084 = fVar9;
                CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
                ::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
                          *)&local_8038,(OpenListInfo_t *)&local_8088);
                goto LAB_0098baf1;
              }
            }
          }
        }
        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_0098baae:
            *(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
          }
          else {
            fVar9 = *(float *)param_2;
            if (*(float *)(iVar6 + 4) <= fVar9) {
              if (fVar9 <= *(float *)(iVar6 + 0x10)) {
                fVar9 = 0.0;
              }
              else {
                fVar9 = fVar9 - *(float *)(iVar6 + 0x10);
                fVar9 = fVar9 * fVar9;
              }
            }
            else {
              fVar9 = *(float *)(iVar6 + 4) - fVar9;
              fVar9 = fVar9 * fVar9;
            }
            fVar10 = *(float *)(param_2 + 4);
            if (*(float *)(iVar6 + 8) <= fVar10) {
              if (*(float *)(iVar6 + 0x14) < fVar10) {
                fVar10 = fVar10 - *(float *)(iVar6 + 0x14);
                fVar9 = fVar9 + fVar10 * fVar10;
              }
            }
            else {
              fVar10 = *(float *)(iVar6 + 8) - fVar10;
              fVar9 = fVar9 + fVar10 * fVar10;
            }
            if (fVar9 < param_4) {
              fVar11 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
              fVar9 = *(float *)(iVar6 + 0x34) - *(float *)(this + 0x34);
              fVar10 = *(float *)(iVar6 + 0x2c) - *(float *)(this + 0x2c);
              fVar9 = SQRT(fVar9 * fVar9 + fVar11 * fVar11 + fVar10 * fVar10) +
                      *(float *)(this + 0x44);
              *(float *)(iVar6 + 0x44) = fVar9;
              *(float *)(iVar6 + 0x40) = fVar9;
              if (fVar9 < local_80c0) {
                local_8078 = iVar6;
                local_8074 = fVar9;
                CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
                ::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
                          *)&local_8038,(OpenListInfo_t *)&local_8078);
                goto LAB_0098baae;
              }
            }
          }
        }
        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_0098ba6b:
            *(int *)(iVar5 + 0x50) = CNavArea::m_masterMarker;
          }
          else {
            fVar9 = *(float *)param_2;
            if (*(float *)(iVar5 + 4) <= fVar9) {
              if (fVar9 <= *(float *)(iVar5 + 0x10)) {
                fVar9 = 0.0;
              }
              else {
                fVar9 = fVar9 - *(float *)(iVar5 + 0x10);
                fVar9 = fVar9 * fVar9;
              }
            }
            else {
              fVar9 = *(float *)(iVar5 + 4) - fVar9;
              fVar9 = fVar9 * fVar9;
            }
            fVar10 = *(float *)(param_2 + 4);
            if (*(float *)(iVar5 + 8) <= fVar10) {
              if (*(float *)(iVar5 + 0x14) < fVar10) {
                fVar10 = fVar10 - *(float *)(iVar5 + 0x14);
                fVar9 = fVar9 + fVar10 * fVar10;
              }
            }
            else {
              fVar10 = *(float *)(iVar5 + 8) - fVar10;
              fVar9 = fVar9 + fVar10 * fVar10;
            }
            if (fVar9 < param_4) {
              fVar9 = *(float *)(iVar5 + 0x30) - *(float *)(this + 0x30);
              fVar11 = *(float *)(iVar5 + 0x34) - *(float *)(this + 0x34);
              fVar10 = *(float *)(iVar5 + 0x2c) - *(float *)(this + 0x2c);
              fVar9 = SQRT(fVar9 * fVar9 + fVar11 * fVar11 + fVar10 * fVar10) +
                      *(float *)(this + 0x44);
              *(float *)(iVar5 + 0x44) = fVar9;
              *(float *)(iVar5 + 0x40) = fVar9;
              if (fVar9 < local_80c0) {
                local_8068 = iVar5;
                local_8064 = fVar9;
                CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
                ::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
                          *)&local_8038,(OpenListInfo_t *)&local_8068);
                goto LAB_0098ba6b;
              }
            }
          }
        }
        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_0098bd2c:
            *(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
          }
          else {
            fVar9 = *(float *)param_2;
            if (fVar9 < *(float *)(iVar6 + 4)) {
              fVar9 = *(float *)(iVar6 + 4) - fVar9;
              fVar9 = fVar9 * fVar9;
            }
            else if (fVar9 <= *(float *)(iVar6 + 0x10)) {
              fVar9 = 0.0;
            }
            else {
              fVar9 = fVar9 - *(float *)(iVar6 + 0x10);
              fVar9 = fVar9 * fVar9;
            }
            fVar10 = *(float *)(param_2 + 4);
            if (*(float *)(iVar6 + 8) <= fVar10) {
              if (*(float *)(iVar6 + 0x14) < fVar10) {
                fVar10 = fVar10 - *(float *)(iVar6 + 0x14);
                fVar9 = fVar9 + fVar10 * fVar10;
              }
            }
            else {
              fVar10 = *(float *)(iVar6 + 8) - fVar10;
              fVar9 = fVar9 + fVar10 * fVar10;
            }
            if (fVar9 < param_4) {
              fVar11 = *(float *)(iVar6 + 0x2c) - *(float *)(this + 0x2c);
              fVar9 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
              fVar10 = *(float *)(iVar6 + 0x34) - *(float *)(this + 0x34);
              fVar9 = SQRT(fVar9 * fVar9 + fVar11 * fVar11 + fVar10 * fVar10) +
                      *(float *)(this + 0x44);
              *(float *)(iVar6 + 0x44) = fVar9;
              *(float *)(iVar6 + 0x40) = fVar9;
              if (fVar9 < local_80c0) {
                local_8058 = iVar6;
                local_8054 = fVar9;
                CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
                ::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
                          *)&local_8038,(OpenListInfo_t *)&local_8058);
                goto LAB_0098bd2c;
              }
            }
          }
          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_0098bf15:
              *(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
            }
            else {
              fVar9 = *(float *)param_2;
              if (fVar9 < *(float *)(iVar6 + 4)) {
                fVar9 = *(float *)(iVar6 + 4) - fVar9;
                fVar9 = fVar9 * fVar9;
              }
              else if (fVar9 <= *(float *)(iVar6 + 0x10)) {
                fVar9 = 0.0;
              }
              else {
                fVar9 = fVar9 - *(float *)(iVar6 + 0x10);
                fVar9 = fVar9 * fVar9;
              }
              fVar10 = *(float *)(param_2 + 4);
              if (*(float *)(iVar6 + 8) <= fVar10) {
                if (*(float *)(iVar6 + 0x14) < fVar10) {
                  fVar10 = fVar10 - *(float *)(iVar6 + 0x14);
                  fVar9 = fVar9 + fVar10 * fVar10;
                }
              }
              else {
                fVar10 = *(float *)(iVar6 + 8) - fVar10;
                fVar9 = fVar9 + fVar10 * fVar10;
              }
              if (fVar9 < param_4) {
                fVar11 = *(float *)(iVar6 + 0x2c) - *(float *)(this + 0x2c);
                fVar9 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
                fVar10 = *(float *)(iVar6 + 0x34) - *(float *)(this + 0x34);
                fVar9 = SQRT(fVar9 * fVar9 + fVar11 * fVar11 + fVar10 * fVar10) +
                        *(float *)(this + 0x44);
                *(float *)(iVar6 + 0x44) = fVar9;
                *(float *)(iVar6 + 0x40) = fVar9;
                if (fVar9 < local_80c0) {
                  local_8048 = iVar6;
                  local_8044 = fVar9;
                  CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
                  ::Insert((CUtlPriorityQueue<OpenListInfo_t,COpenListLessFunc,CUtlMemoryFixedGrowable<OpenListInfo_t,4096u,int>>
                            *)&local_8038,(OpenListInfo_t *)&local_8048);
                  goto LAB_0098bf15;
                }
              }
            }
            piVar4 = *(int **)pCVar3;
          }
          iVar5 = iVar5 + 1;
        } while (iVar5 < *piVar4);
      }
    }
  }
  goto LAB_0098b1b5;
}

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)