L L4D2node

SearchSurroundingAreas<EscapeSpitScan>

0x0092d5a0 · 5516 bytes · __cdecl

_Z22SearchSurroundingAreasI14EscapeSpitScanEvP8CNavAreaRK6VectorRT_fji

Decompiled

void (6 params)

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

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

{
  CNavArea *this;
  uint uVar1;
  byte bVar2;
  char cVar3;
  int *piVar4;
  int *piVar5;
  SurvivorBot *this_00;
  int iVar6;
  int iVar7;
  CNavArea *pCVar8;
  int *piVar9;
  undefined *puVar10;
  int iVar11;
  int iVar12;
  longdouble lVar13;
  longdouble lVar14;
  float fVar15;
  float fVar16;
  float fVar17;
  float local_80e0;
  float local_80dc;
  float local_80d8;
  float local_80cc;
  int local_80c8;
  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) {
    iVar11 = CNavArea::m_masterMarker + 1;
    CNavArea::m_masterMarker = 1;
    if (iVar11 != 0) {
      CNavArea::m_masterMarker = iVar11;
    }
    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 0092d66c to 0092eb00 has its CatchHandler @ 0092eb4e */
      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_0092d6c3:
    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) || (cVar3 = CNavArea::IsBlocked(this,param_6,false), cVar3 == '\0'))
         && (*(float *)(this + 0x44) < *(float *)(param_3 + 8) ||
             *(float *)(this + 0x44) == *(float *)(param_3 + 8))) {
        piVar9 = (int *)0x0;
        if (*(int *)param_3 != 0) {
          piVar9 = (int *)(*(int *)param_3 + 0x4028);
        }
        piVar4 = (int *)(**(code **)(*piVar9 + 0xc0))(piVar9);
        piVar5 = (int *)(**(code **)(*piVar9 + 200))(piVar9);
        iVar11 = (**(code **)(*piVar5 + 0xb8))(piVar5,piVar9);
        pCVar8 = *(CNavArea **)(this + 0x78);
        cVar3 = (**(code **)(*piVar4 + 0x150))(piVar4,this);
        if (cVar3 != '\0') {
          iVar6 = *(int *)(this + 0x70);
          iVar12 = *(int *)(gpGlobals + 0x18);
          if ((iVar6 < iVar12) || (iVar11 != 0)) {
            if (pCVar8 != (CNavArea *)0x0) {
              lVar13 = (longdouble)CNavArea::GetZDeltaAtEdgeToArea(pCVar8,this);
              fVar15 = (float)lVar13;
              lVar13 = (longdouble)(**(code **)(*piVar4 + 0x134))(piVar4);
              lVar14 = (longdouble)(**(code **)(*piVar4 + 0x130))(piVar4);
              if ((float)lVar14 + (float)lVar13 < fVar15) goto LAB_0092d6c3;
              lVar13 = (longdouble)(**(code **)(*piVar4 + 0x138))(piVar4);
              if ((float)lVar13 < -fVar15) goto LAB_0092d6c3;
              lVar13 = (longdouble)(**(code **)(*piVar4 + 0x130))(piVar4);
              if (fVar15 <= (float)lVar13) {
                lVar13 = (longdouble)(**(code **)(*piVar4 + 0x130))(piVar4);
                if (fVar15 < -(float)lVar13) {
                  lVar13 = (longdouble)(**(code **)(*piVar4 + 0x130))(piVar4);
                  lVar14 = (longdouble)(**(code **)(*piVar4 + 0x130))(piVar4);
                  local_80d8 = (-fVar15 - (float)lVar13) / (100.0 - (float)lVar14) + 1.0;
                }
                else {
                  local_80d8 = 1.0;
                }
              }
              else {
                lVar13 = (longdouble)(**(code **)(*piVar4 + 0x134))();
                local_80d8 = (float)(~-(uint)((float)lVar13 < fVar15) & 0x40000000 |
                                    -(uint)((float)lVar13 < fVar15) & 0x42c80000);
              }
              lVar13 = (longdouble)CNavArea::GetAverageLightIntensity(this);
              if (0.4 <= (float)lVar13) {
                local_80dc = 1.0;
              }
              else {
                local_80dc = (0.4 - (float)lVar13) * 5.0 + 1.0;
              }
              local_80c4 = (CNavArea *)0x3f800000;
              local_80e0 = 1.0;
              if (*(int *)(gpGlobals + 0x18) <= *(int *)(this + 0x70)) {
                local_80e0 = 100.0;
              }
              if (this[0x3a] == (CNavArea)0x0) {
                local_80cc = 1.0;
              }
              else {
                fVar15 = (float)(byte)this[0x3a] + 0.0;
                if (fVar15 <= 18.0) {
                  local_80cc = 1.0;
                }
                else {
                  lVar13 = (longdouble)(**(code **)(*piVar4 + 0x134))(piVar4);
                  local_80cc = 100.0;
                  if (fVar15 < (float)lVar13) {
                    lVar13 = (longdouble)(**(code **)(*piVar4 + 0x134))(piVar4);
                    fVar16 = (float)lVar13;
                    lVar13 = (longdouble)(**(code **)(*piVar4 + 0x130))(piVar4);
                    fVar17 = (float)lVar13;
                    if (fVar16 == fVar17) {
                      local_80cc = (float)(~-(uint)(fVar16 <= fVar15) & 0x41200000 |
                                          -(uint)(fVar16 <= fVar15) & 0x41a00000);
                    }
                    else {
                      local_80cc = ((fVar15 - fVar17) * 10.0) / (fVar16 - fVar17) + 10.0;
                    }
                  }
                }
              }
              this_00 = (SurvivorBot *)(**(code **)(*piVar9 + 0xb4))(piVar9);
              iVar6 = SurvivorBot::GetTeamSituation(this_00);
              iVar11 = *(int *)(iVar6 + 0xc4);
              local_80c8 = 0;
              if (0 < iVar11) {
                do {
                  uVar1 = *(uint *)(iVar6 + 0x88 + local_80c8 * 4);
                  piVar4 = (int *)0x0;
                  if (((uVar1 != 0xffffffff) &&
                      (puVar10 = g_pEntityList + (uVar1 & 0xfff) * 0x10,
                      puVar10 != (undefined *)0xfffffffc)) &&
                     (*(uint *)(puVar10 + 8) == uVar1 >> 0xc)) {
                    piVar4 = *(int **)(puVar10 + 4);
                  }
                  cVar3 = (**(code **)(*piVar4 + 0x5a8))(piVar4);
                  if (cVar3 == '\0') {
                    uVar1 = *(uint *)(iVar6 + 0x88 + local_80c8 * 4);
                    if (((uVar1 == 0xffffffff) ||
                        (puVar10 = g_pEntityList + (uVar1 & 0xfff) * 0x10,
                        puVar10 == (undefined *)0xfffffffc)) ||
                       (*(uint *)(puVar10 + 8) != uVar1 >> 0xc)) {
                      bVar2 = (byte)this[0x7e] >> (uRam00002ba0 & 0x1f);
                    }
                    else {
                      bVar2 = (byte)this[0x7e] >> (*(uint *)(*(int *)(puVar10 + 4) + 0x2ba0) & 0x1f)
                      ;
                    }
                    if ((bVar2 & 1) != 0) {
                      iVar11 = *(int *)(iVar6 + 0xc4);
                      break;
                    }
                  }
                  local_80c8 = local_80c8 + 1;
                  iVar11 = *(int *)(iVar6 + 0xc4);
                } while (local_80c8 < iVar11);
              }
              if ((iVar11 != 0) && (local_80c4 = (CNavArea *)0x41200000, iVar11 != local_80c8)) {
                local_80c4 = (CNavArea *)0x3f800000;
              }
              if (local_80e0 <= local_80dc) {
                local_80e0 = local_80dc;
              }
              if (local_80e0 <= local_80cc) {
                local_80e0 = local_80cc;
              }
              if ((float)local_80c4 <= local_80e0) {
                local_80c4 = (CNavArea *)local_80e0;
              }
              iVar11 = (**(code **)(*piVar9 + 0xb4))(piVar9);
              fVar15 = 0.0;
              if (*(int *)(iVar11 + 0x30) != 0) {
                fVar15 = (float)(*(int *)(iVar11 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4);
              }
              lVar13 = (longdouble)
                       FastCos(((float)(*(uint *)(this + 0x8c) >> 0x10) * 65536.0 +
                               (float)(*(uint *)(this + 0x8c) & 0xffff)) * fVar15);
              if ((((float)lVar13 + 1.0) * 10.0 + (float)local_80c4) * local_80d8 +
                  *(float *)(pCVar8 + 0x44) < 0.0) goto LAB_0092d6c3;
              iVar6 = *(int *)(this + 0x70);
              iVar12 = *(int *)(gpGlobals + 0x18);
            }
            if (iVar6 < iVar12) {
              *(CNavArea **)(param_3 + 4) = this;
              *(undefined4 *)(param_3 + 8) = *(undefined4 *)(this + 0x44);
            }
            local_80c4 = this;
            do {
              piVar9 = *(int **)(local_80c4 + 0x58);
              iVar11 = *piVar9;
              if (0 < iVar11) {
                iVar12 = 0;
                iVar6 = iVar11;
                do {
                  if (iVar6 < 1) {
LAB_0092dc22:
                    pCVar8 = (CNavArea *)0x0;
                  }
                  else {
                    iVar7 = 0;
                    if (iVar12 != 0) {
                      do {
                        iVar7 = iVar7 + 1;
                        if (iVar7 == iVar6) goto LAB_0092dc22;
                      } while (iVar7 != iVar12);
                    }
                    pCVar8 = (CNavArea *)piVar9[iVar7 * 2 + 1];
                  }
                  if ((((param_5 & 4) == 0) ||
                      (cVar3 = CNavArea::IsConnected(pCVar8,this,4), cVar3 != '\0')) &&
                     ((pCVar8 != (CNavArea *)0x0 &&
                      ((*(int *)(pCVar8 + 0x3c) != CNavArea::m_masterMarker &&
                       (CNavArea::m_masterMarker != *(int *)(pCVar8 + 0x50))))))) {
                    *(int *)(pCVar8 + 0x3c) = CNavArea::m_masterMarker;
                    *(CNavArea **)(pCVar8 + 0x78) = this;
                    pCVar8[0x7c] = (CNavArea)((byte)pCVar8[0x7c] & 0xf0 | 9);
                    if (0.0 < local_80c0) {
                      fVar15 = *(float *)param_2;
                      if (*(float *)(pCVar8 + 4) <= fVar15) {
                        if (fVar15 <= *(float *)(pCVar8 + 0x10)) {
                          fVar15 = 0.0;
                        }
                        else {
                          fVar15 = fVar15 - *(float *)(pCVar8 + 0x10);
                          fVar15 = fVar15 * fVar15;
                        }
                      }
                      else {
                        fVar15 = *(float *)(pCVar8 + 4) - fVar15;
                        fVar15 = fVar15 * fVar15;
                      }
                      fVar16 = *(float *)(param_2 + 4);
                      if (*(float *)(pCVar8 + 8) <= fVar16) {
                        if (*(float *)(pCVar8 + 0x14) < fVar16) {
                          fVar16 = fVar16 - *(float *)(pCVar8 + 0x14);
                          fVar15 = fVar15 + fVar16 * fVar16;
                        }
                      }
                      else {
                        fVar16 = *(float *)(pCVar8 + 8) - fVar16;
                        fVar15 = fVar15 + fVar16 * fVar16;
                      }
                      if (fVar15 < param_4) {
                        fVar15 = SQRT((*(float *)(pCVar8 + 0x34) - *(float *)(this + 0x34)) *
                                      (*(float *)(pCVar8 + 0x34) - *(float *)(this + 0x34)) +
                                      (*(float *)(pCVar8 + 0x2c) - *(float *)(this + 0x2c)) *
                                      (*(float *)(pCVar8 + 0x2c) - *(float *)(this + 0x2c)) +
                                      (*(float *)(pCVar8 + 0x30) - *(float *)(this + 0x30)) *
                                      (*(float *)(pCVar8 + 0x30) - *(float *)(this + 0x30))) +
                                 *(float *)(this + 0x44);
                        *(float *)(pCVar8 + 0x44) = fVar15;
                        *(float *)(pCVar8 + 0x40) = fVar15;
                        if (fVar15 < local_80c0) {
                          local_80a8 = pCVar8;
                          local_80a4 = fVar15;
                          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_0092dde8;
                        }
                      }
                    }
                    else {
                      *(undefined4 *)(pCVar8 + 0x40) = 0;
                      *(undefined4 *)(pCVar8 + 0x44) = 0;
                      local_809c = 0;
                      local_80a0 = pCVar8;
                      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_0092dde8:
                      *(int *)(pCVar8 + 0x50) = CNavArea::m_masterMarker;
                    }
                  }
                  if (iVar12 + 1 == iVar11) break;
                  iVar12 = iVar12 + 1;
                  piVar9 = *(int **)(local_80c4 + 0x58);
                  iVar6 = *piVar9;
                } while( true );
              }
              local_80c4 = local_80c4 + 4;
            } while (local_80c4 != this + 0x10);
            local_80c4 = this;
            if ((param_5 & 1) != 0) {
              do {
                iVar11 = 0;
                piVar9 = *(int **)(local_80c4 + 0x114);
                if (0 < *piVar9) {
                  do {
                    iVar6 = piVar9[iVar11 * 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_0092dfe2:
                        *(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
                      }
                      else {
                        fVar15 = *(float *)param_2;
                        if (fVar15 < *(float *)(iVar6 + 4)) {
                          fVar15 = *(float *)(iVar6 + 4) - fVar15;
                          fVar15 = fVar15 * fVar15;
                        }
                        else if (fVar15 <= *(float *)(iVar6 + 0x10)) {
                          fVar15 = 0.0;
                        }
                        else {
                          fVar15 = fVar15 - *(float *)(iVar6 + 0x10);
                          fVar15 = fVar15 * fVar15;
                        }
                        fVar16 = *(float *)(param_2 + 4);
                        if (*(float *)(iVar6 + 8) <= fVar16) {
                          if (*(float *)(iVar6 + 0x14) < fVar16) {
                            fVar16 = fVar16 - *(float *)(iVar6 + 0x14);
                            fVar15 = fVar15 + fVar16 * fVar16;
                          }
                        }
                        else {
                          fVar16 = *(float *)(iVar6 + 8) - fVar16;
                          fVar15 = fVar15 + fVar16 * fVar16;
                        }
                        if (fVar15 < param_4) {
                          fVar17 = *(float *)(iVar6 + 0x2c) - *(float *)(this + 0x2c);
                          fVar15 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
                          fVar16 = *(float *)(iVar6 + 0x34) - *(float *)(this + 0x34);
                          fVar15 = SQRT(fVar15 * fVar15 + fVar17 * fVar17 + fVar16 * fVar16) +
                                   *(float *)(this + 0x44);
                          *(float *)(iVar6 + 0x44) = fVar15;
                          *(float *)(iVar6 + 0x40) = fVar15;
                          if (fVar15 < local_80c0) {
                            local_8098 = iVar6;
                            local_8094 = fVar15;
                            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_0092dfe2;
                          }
                        }
                      }
                      piVar9 = *(int **)(local_80c4 + 0x114);
                    }
                    iVar11 = iVar11 + 1;
                  } while (iVar11 < *piVar9);
                }
                local_80c4 = local_80c4 + 4;
              } while (local_80c4 != this + 0x10);
            }
            local_80c4 = (CNavArea *)0x0;
            piVar9 = *(int **)(this + 0x68);
            if (0 < *piVar9) {
              do {
                iVar11 = piVar9[(int)local_80c4 + 1];
                iVar6 = *(int *)(iVar11 + 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_0092e4a1:
                    *(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
                  }
                  else {
                    fVar15 = *(float *)param_2;
                    if (fVar15 < *(float *)(iVar6 + 4)) {
                      fVar15 = *(float *)(iVar6 + 4) - fVar15;
                      fVar15 = fVar15 * fVar15;
                    }
                    else if (fVar15 <= *(float *)(iVar6 + 0x10)) {
                      fVar15 = 0.0;
                    }
                    else {
                      fVar15 = fVar15 - *(float *)(iVar6 + 0x10);
                      fVar15 = fVar15 * fVar15;
                    }
                    fVar16 = *(float *)(param_2 + 4);
                    if (*(float *)(iVar6 + 8) <= fVar16) {
                      if (*(float *)(iVar6 + 0x14) < fVar16) {
                        fVar16 = fVar16 - *(float *)(iVar6 + 0x14);
                        fVar15 = fVar15 + fVar16 * fVar16;
                      }
                    }
                    else {
                      fVar16 = *(float *)(iVar6 + 8) - fVar16;
                      fVar15 = fVar15 + fVar16 * fVar16;
                    }
                    if (fVar15 < param_4) {
                      fVar15 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
                      fVar17 = *(float *)(iVar6 + 0x34) - *(float *)(this + 0x34);
                      fVar16 = *(float *)(iVar6 + 0x2c) - *(float *)(this + 0x2c);
                      fVar15 = SQRT(fVar15 * fVar15 + fVar17 * fVar17 + fVar16 * fVar16) +
                               *(float *)(this + 0x44);
                      *(float *)(iVar6 + 0x44) = fVar15;
                      *(float *)(iVar6 + 0x40) = fVar15;
                      if (fVar15 < local_80c0) {
                        local_8088 = iVar6;
                        local_8084 = fVar15;
                        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_0092e4a1;
                      }
                    }
                  }
                }
                iVar6 = *(int *)(iVar11 + 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_0092e45e:
                    *(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
                  }
                  else {
                    fVar15 = *(float *)param_2;
                    if (*(float *)(iVar6 + 4) <= fVar15) {
                      if (fVar15 <= *(float *)(iVar6 + 0x10)) {
                        fVar15 = 0.0;
                      }
                      else {
                        fVar15 = fVar15 - *(float *)(iVar6 + 0x10);
                        fVar15 = fVar15 * fVar15;
                      }
                    }
                    else {
                      fVar15 = *(float *)(iVar6 + 4) - fVar15;
                      fVar15 = fVar15 * fVar15;
                    }
                    fVar16 = *(float *)(param_2 + 4);
                    if (*(float *)(iVar6 + 8) <= fVar16) {
                      if (*(float *)(iVar6 + 0x14) < fVar16) {
                        fVar16 = fVar16 - *(float *)(iVar6 + 0x14);
                        fVar15 = fVar15 + fVar16 * fVar16;
                      }
                    }
                    else {
                      fVar16 = *(float *)(iVar6 + 8) - fVar16;
                      fVar15 = fVar15 + fVar16 * fVar16;
                    }
                    if (fVar15 < param_4) {
                      fVar17 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
                      fVar15 = *(float *)(iVar6 + 0x34) - *(float *)(this + 0x34);
                      fVar16 = *(float *)(iVar6 + 0x2c) - *(float *)(this + 0x2c);
                      fVar15 = SQRT(fVar15 * fVar15 + fVar17 * fVar17 + fVar16 * fVar16) +
                               *(float *)(this + 0x44);
                      *(float *)(iVar6 + 0x44) = fVar15;
                      *(float *)(iVar6 + 0x40) = fVar15;
                      if (fVar15 < local_80c0) {
                        local_8078 = iVar6;
                        local_8074 = fVar15;
                        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_0092e45e;
                      }
                    }
                  }
                }
                iVar11 = *(int *)(iVar11 + 0x2c);
                if (((iVar11 != 0) && (*(int *)(iVar11 + 0x3c) != CNavArea::m_masterMarker)) &&
                   (CNavArea::m_masterMarker != *(int *)(iVar11 + 0x50))) {
                  *(int *)(iVar11 + 0x3c) = CNavArea::m_masterMarker;
                  *(CNavArea **)(iVar11 + 0x78) = this;
                  *(byte *)(iVar11 + 0x7c) = *(byte *)(iVar11 + 0x7c) & 0xf0 | 9;
                  if (local_80c0 <= 0.0) {
                    *(undefined4 *)(iVar11 + 0x40) = 0;
                    *(undefined4 *)(iVar11 + 0x44) = 0;
                    local_805c = 0;
                    local_8060 = iVar11;
                    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_0092e41b:
                    *(int *)(iVar11 + 0x50) = CNavArea::m_masterMarker;
                  }
                  else {
                    fVar15 = *(float *)param_2;
                    if (*(float *)(iVar11 + 4) <= fVar15) {
                      if (fVar15 <= *(float *)(iVar11 + 0x10)) {
                        fVar15 = 0.0;
                      }
                      else {
                        fVar15 = fVar15 - *(float *)(iVar11 + 0x10);
                        fVar15 = fVar15 * fVar15;
                      }
                    }
                    else {
                      fVar15 = *(float *)(iVar11 + 4) - fVar15;
                      fVar15 = fVar15 * fVar15;
                    }
                    fVar16 = *(float *)(param_2 + 4);
                    if (*(float *)(iVar11 + 8) <= fVar16) {
                      if (*(float *)(iVar11 + 0x14) < fVar16) {
                        fVar16 = fVar16 - *(float *)(iVar11 + 0x14);
                        fVar15 = fVar15 + fVar16 * fVar16;
                      }
                    }
                    else {
                      fVar16 = *(float *)(iVar11 + 8) - fVar16;
                      fVar15 = fVar15 + fVar16 * fVar16;
                    }
                    if (fVar15 < param_4) {
                      fVar15 = *(float *)(iVar11 + 0x2c) - *(float *)(this + 0x2c);
                      fVar17 = *(float *)(iVar11 + 0x34) - *(float *)(this + 0x34);
                      fVar16 = *(float *)(iVar11 + 0x30) - *(float *)(this + 0x30);
                      fVar15 = SQRT(fVar15 * fVar15 + fVar17 * fVar17 + fVar16 * fVar16) +
                               *(float *)(this + 0x44);
                      *(float *)(iVar11 + 0x44) = fVar15;
                      *(float *)(iVar11 + 0x40) = fVar15;
                      if (fVar15 < local_80c0) {
                        local_8068 = iVar11;
                        local_8064 = fVar15;
                        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_0092e41b;
                      }
                    }
                  }
                }
                local_80c4 = (CNavArea *)((int)local_80c4 + 1);
                piVar9 = *(int **)(this + 0x68);
              } while ((int)local_80c4 < *piVar9);
            }
            piVar9 = *(int **)(this + 0x6c);
            iVar11 = 0;
            if (0 < *piVar9) {
              do {
                iVar6 = *(int *)(piVar9[iVar11 + 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_0092e6d5:
                    *(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
                  }
                  else {
                    fVar15 = *(float *)param_2;
                    if (fVar15 < *(float *)(iVar6 + 4)) {
                      fVar15 = *(float *)(iVar6 + 4) - fVar15;
                      fVar15 = fVar15 * fVar15;
                    }
                    else if (fVar15 <= *(float *)(iVar6 + 0x10)) {
                      fVar15 = 0.0;
                    }
                    else {
                      fVar15 = fVar15 - *(float *)(iVar6 + 0x10);
                      fVar15 = fVar15 * fVar15;
                    }
                    fVar16 = *(float *)(param_2 + 4);
                    if (*(float *)(iVar6 + 8) <= fVar16) {
                      if (*(float *)(iVar6 + 0x14) < fVar16) {
                        fVar16 = fVar16 - *(float *)(iVar6 + 0x14);
                        fVar15 = fVar15 + fVar16 * fVar16;
                      }
                    }
                    else {
                      fVar16 = *(float *)(iVar6 + 8) - fVar16;
                      fVar15 = fVar15 + fVar16 * fVar16;
                    }
                    if (fVar15 < param_4) {
                      fVar15 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
                      fVar17 = *(float *)(iVar6 + 0x34) - *(float *)(this + 0x34);
                      fVar16 = *(float *)(iVar6 + 0x2c) - *(float *)(this + 0x2c);
                      fVar15 = SQRT(fVar15 * fVar15 + fVar17 * fVar17 + fVar16 * fVar16) +
                               *(float *)(this + 0x44);
                      *(float *)(iVar6 + 0x44) = fVar15;
                      *(float *)(iVar6 + 0x40) = fVar15;
                      if (fVar15 < local_80c0) {
                        local_8058 = iVar6;
                        local_8054 = fVar15;
                        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_0092e6d5;
                      }
                    }
                  }
                  piVar9 = *(int **)(this + 0x6c);
                }
                iVar11 = iVar11 + 1;
              } while (iVar11 < *piVar9);
            }
            if ((param_5 & 8) == 0) {
              if ((CNavArea::GetElevatorAreas()::empty == '\0') &&
                 (iVar11 = __cxa_guard_acquire(&CNavArea::GetElevatorAreas()::empty), iVar11 != 0))
              {
                if ((CUtlVectorUltraConservative<NavConnect,CUtlVectorUltraConservativeAllocator>::
                     StaticData()::staticData == '\0') &&
                   (iVar11 = __cxa_guard_acquire(&CUtlVectorUltraConservative<NavConnect,CUtlVectorUltraConservativeAllocator>
                                                  ::StaticData()::staticData), iVar11 != 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);
              }
              pCVar8 = this + 0x88;
              if (((byte)this[0x57] & 0x40) == 0) {
                pCVar8 = (CNavArea *)&CNavArea::GetElevatorAreas()::empty;
              }
              piVar9 = *(int **)pCVar8;
              if (0 < *piVar9) {
                iVar11 = 0;
                do {
                  iVar6 = piVar9[iVar11 * 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_0092e8be:
                      *(int *)(iVar6 + 0x50) = CNavArea::m_masterMarker;
                    }
                    else {
                      fVar15 = *(float *)param_2;
                      if (fVar15 < *(float *)(iVar6 + 4)) {
                        fVar15 = *(float *)(iVar6 + 4) - fVar15;
                        fVar15 = fVar15 * fVar15;
                      }
                      else if (fVar15 <= *(float *)(iVar6 + 0x10)) {
                        fVar15 = 0.0;
                      }
                      else {
                        fVar15 = fVar15 - *(float *)(iVar6 + 0x10);
                        fVar15 = fVar15 * fVar15;
                      }
                      fVar16 = *(float *)(param_2 + 4);
                      if (*(float *)(iVar6 + 8) <= fVar16) {
                        if (*(float *)(iVar6 + 0x14) < fVar16) {
                          fVar16 = fVar16 - *(float *)(iVar6 + 0x14);
                          fVar15 = fVar15 + fVar16 * fVar16;
                        }
                      }
                      else {
                        fVar16 = *(float *)(iVar6 + 8) - fVar16;
                        fVar15 = fVar15 + fVar16 * fVar16;
                      }
                      if (fVar15 < param_4) {
                        fVar17 = *(float *)(iVar6 + 0x2c) - *(float *)(this + 0x2c);
                        fVar15 = *(float *)(iVar6 + 0x34) - *(float *)(this + 0x34);
                        fVar16 = *(float *)(iVar6 + 0x30) - *(float *)(this + 0x30);
                        fVar15 = SQRT(fVar15 * fVar15 + fVar17 * fVar17 + fVar16 * fVar16) +
                                 *(float *)(this + 0x44);
                        *(float *)(iVar6 + 0x44) = fVar15;
                        *(float *)(iVar6 + 0x40) = fVar15;
                        if (fVar15 < local_80c0) {
                          local_8048 = iVar6;
                          local_8044 = fVar15;
                          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_0092e8be;
                        }
                      }
                    }
                    piVar9 = *(int **)pCVar8;
                  }
                  iVar11 = iVar11 + 1;
                } while (iVar11 < *piVar9);
              }
            }
          }
        }
      }
      goto LAB_0092d6c3;
    }
    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)