L L4D2node

Path::ComputePathDetails

0x0075f9b0 · 7208 bytes · __thiscall

_ZN4Path18ComputePathDetailsEP8INextBotRK6Vector

Decompiled

undefined (3 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* Path::ComputePathDetails(INextBot*, Vector const&) */

undefined4 __thiscall Path::ComputePathDetails(Path *this,INextBot *param_1,Vector *param_2)

{
  uint *puVar1;
  float fVar2;
  float fVar3;
  undefined4 uVar4;
  undefined4 uVar5;
  undefined4 uVar6;
  undefined4 uVar7;
  undefined4 uVar8;
  undefined4 uVar9;
  undefined4 uVar10;
  undefined4 uVar11;
  undefined4 uVar12;
  float fVar13;
  float fVar14;
  float fVar15;
  undefined4 uVar16;
  undefined4 uVar17;
  undefined4 uVar18;
  uint uVar19;
  char cVar20;
  int *piVar21;
  int *piVar22;
  int iVar23;
  IHandleEntity *pIVar24;
  int *piVar25;
  int iVar26;
  int iVar27;
  int iVar28;
  Path *pPVar29;
  int iVar30;
  Path *pPVar31;
  Path *pPVar32;
  int iVar33;
  Path *pPVar34;
  Path *pPVar35;
  undefined4 uVar36;
  float *pfVar37;
  byte bVar38;
  longdouble lVar39;
  longdouble lVar40;
  longdouble lVar41;
  float fVar42;
  float fVar43;
  float fVar44;
  int local_144;
  undefined4 local_130;
  float local_12c;
  float local_128;
  float local_124;
  int local_120;
  float local_118;
  float local_114;
  float local_110;
  undefined4 local_10c;
  undefined4 local_108;
  undefined4 local_100;
  undefined4 local_fc;
  int local_f8;
  float local_f4;
  float local_f0;
  float local_ec;
  float local_e8;
  float local_e4;
  float local_e0;
  undefined **local_dc;
  float local_d8;
  float local_d4;
  float local_cc;
  float local_c8;
  float local_c4;
  undefined4 local_bc;
  undefined4 local_b8;
  float local_b4;
  undefined4 local_ac;
  undefined4 local_a8;
  float local_a4;
  float local_9c;
  float local_98;
  float local_94;
  undefined4 local_8c;
  undefined1 local_88;
  undefined1 local_87;
  float local_70;
  float local_6c;
  float local_68;
  float local_64;
  float local_60;
  undefined4 local_5c;
  undefined4 local_58;
  undefined4 local_54;
  undefined4 local_50;
  undefined4 local_4c;
  undefined4 local_48;
  float local_44;
  undefined4 local_40;
  undefined4 local_3c;
  undefined4 local_38;
  undefined4 local_34;
  undefined4 local_30;
  
  bVar38 = 0;
  local_10c = 0;
  local_108 = 0;
  if (_towlower == 0) {
    local_f8 = 0;
  }
  else {
    (**(code **)(_towlower + 0x50))
              (_towlower,&local_10c,0,0,0,0,"/data/src/game/server/nextbot/path/nextbotpath.cpp",
               0x2c,&ComputePathDetails(INextBot*,Vector_const&)::tm_fmt,"(%s)%s","NextBot",
               "Path::ComputePathDetails");
    local_f8 = _towlower;
  }
  iVar30 = _DAT_0105db00;
  local_100 = local_10c;
  local_fc = local_108;
                    /* try { // try from 00760a0d to 00760a6d has its CatchHandler @ 00761642 */
  if (((_DAT_0105d154 == 0) && (DAT_0105d158 != '\0')) ||
     (iVar23 = ThreadGetCurrentId(), iVar30 != iVar23)) {
    iVar30 = *(int *)(this + 0x4404);
  }
  else {
    if ((char *)*_DAT_0105d15c != "Path::ComputePathDetails") {
      _DAT_0105d15c =
           (int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcaa4a3,(char *)0x0,0xca8906);
    }
    puVar1 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
    *puVar1 = *puVar1 | 4;
    CVProfNode::EnterScope();
    DAT_0105d158 = '\0';
    iVar30 = *(int *)(this + 0x4404);
  }
  if (iVar30 == 0) {
LAB_00760a90:
    uVar36 = 0;
  }
  else {
                    /* try { // try from 0075fa9a to 007601ef has its CatchHandler @ 0076161c */
    piVar21 = (int *)(**(code **)(*(int *)param_1 + 0xc4))(param_1);
    piVar22 = (int *)(**(code **)(*(int *)param_1 + 0xc0))(param_1);
    if (piVar22 == (int *)0x0) {
      local_12c = 18.0;
    }
    else {
      lVar39 = (longdouble)(**(code **)(*piVar22 + 0x130))(piVar22);
      local_12c = (float)lVar39;
    }
    if (piVar21 == (int *)0x0) {
      fVar43 = 1.0;
    }
    else {
      lVar39 = (longdouble)(**(code **)(*piVar21 + 0x118))(piVar21);
      fVar43 = (float)lVar39 + 5.0;
    }
    cVar20 = CNavArea::Contains(*(CNavArea **)(this + 4),param_2);
    if (cVar20 == '\0') {
      iVar30 = *(int *)(this + 4);
      *(undefined4 *)(this + 0xc) = *(undefined4 *)(iVar30 + 0x2c);
      *(undefined4 *)(this + 0x10) = *(undefined4 *)(iVar30 + 0x30);
      *(undefined4 *)(this + 0x14) = *(undefined4 *)(iVar30 + 0x34);
    }
    else {
      *(undefined4 *)(this + 0xc) = *(undefined4 *)param_2;
      *(undefined4 *)(this + 0x10) = *(undefined4 *)(param_2 + 4);
      *(undefined4 *)(this + 0x14) = *(undefined4 *)(param_2 + 8);
    }
    *(undefined4 *)(this + 0x18) = 0;
    *(undefined4 *)(this + 8) = 9;
    *(undefined4 *)(this + 0x1c) = 0;
    if (1 < *(int *)(this + 0x4404)) {
      local_144 = 1;
      fVar44 = fVar43 * 0.5;
      do {
        while( true ) {
          iVar23 = local_144 + -1;
          iVar30 = *(int *)(this + local_144 * 0x44 + 8);
          if (iVar30 < 4) break;
          if (iVar30 == 4) {
            iVar30 = *(int *)(this + iVar23 * 0x44 + 4);
            piVar25 = *(int **)(iVar30 + 0x68);
            iVar23 = *piVar25;
            if (iVar23 < 1) {
              iVar28 = 0;
            }
            else {
              iVar26 = piVar25[1];
              iVar27 = *(int *)(this + local_144 * 0x44 + 4);
              if (((*(int *)(iVar26 + 0x24) == iVar27) || (iVar27 == *(int *)(iVar26 + 0x28))) ||
                 (iVar33 = 0, iVar27 == *(int *)(iVar26 + 0x2c))) {
                iVar28 = 0;
              }
              else {
                do {
                  iVar28 = iVar33 + 1;
                  if (iVar28 == iVar23) goto LAB_00760a90;
                  iVar26 = piVar25[iVar33 + 2];
                } while (((*(int *)(iVar26 + 0x24) != iVar27) && (*(int *)(iVar26 + 0x28) != iVar27)
                         ) && (iVar33 = iVar28, *(int *)(iVar26 + 0x2c) != iVar27));
              }
              *(int *)(this + local_144 * 0x44 + 0x18) = iVar26;
              fVar42 = *(float *)(iVar26 + 0x44);
              fVar2 = *(float *)(iVar26 + 0x48);
              fVar3 = *(float *)(iVar26 + 0x40);
              fVar15 = *(float *)(iVar26 + 0x14);
              fVar13 = *(float *)(iVar26 + 0x18);
              fVar14 = *(float *)(iVar26 + 0x10);
              *(undefined4 *)(this + local_144 * 0x44 + 0x1c) = 4;
              *(float *)(this + local_144 * 0x44 + 0x10) = fVar42 * 32.0 + fVar15;
              *(float *)(this + local_144 * 0x44 + 0x14) = fVar2 * 32.0 + fVar13;
              *(float *)(this + local_144 * 0x44 + 0xc) = fVar3 * 32.0 + fVar14;
              iVar23 = **(int **)(iVar30 + 0x68);
            }
            if (iVar28 == iVar23) goto LAB_00760a90;
          }
          else if (iVar30 == 5) {
            iVar30 = *(int *)(this + iVar23 * 0x44 + 4);
            piVar25 = *(int **)(iVar30 + 0x6c);
            iVar23 = *piVar25;
            if (iVar23 < 1) {
              iVar28 = 0;
            }
            else {
              iVar26 = piVar25[1];
              iVar27 = 0;
              if (*(int *)(iVar26 + 0x34) == *(int *)(this + local_144 * 0x44 + 4)) {
                iVar28 = 0;
              }
              else {
                do {
                  iVar28 = iVar27 + 1;
                  if (iVar28 == iVar23) goto LAB_00760a90;
                  iVar26 = piVar25[iVar27 + 2];
                  iVar27 = iVar28;
                } while (*(int *)(iVar26 + 0x34) != *(int *)(this + local_144 * 0x44 + 4));
              }
              *(int *)(this + local_144 * 0x44 + 0x18) = iVar26;
              *(undefined4 *)(this + local_144 * 0x44 + 0xc) = *(undefined4 *)(iVar26 + 4);
              *(undefined4 *)(this + local_144 * 0x44 + 0x10) = *(undefined4 *)(iVar26 + 8);
              *(undefined4 *)(this + local_144 * 0x44 + 0x14) = *(undefined4 *)(iVar26 + 0xc);
              fVar42 = *(float *)(iVar26 + 0x48);
              fVar2 = *(float *)(iVar26 + 0x44);
              fVar3 = *(float *)(iVar26 + 8);
              fVar15 = *(float *)(iVar26 + 0x40);
              fVar13 = *(float *)(iVar26 + 0xc);
              fVar14 = *(float *)(iVar26 + 4);
              *(undefined4 *)(this + local_144 * 0x44 + 0x1c) = 5;
              *(float *)(this + local_144 * 0x44 + 0x10) = fVar3 - fVar2 * 32.0;
              *(float *)(this + local_144 * 0x44 + 0x14) = fVar13 - fVar42 * 32.0;
              *(float *)(this + local_144 * 0x44 + 0xc) = fVar14 - fVar15 * 32.0;
              iVar23 = **(int **)(iVar30 + 0x6c);
            }
            if (iVar23 == iVar28) goto LAB_00760a90;
          }
          else if (iVar30 - 7U < 2) {
            iVar30 = *(int *)(this + local_144 * 0x44 + 4);
            *(undefined4 *)(this + local_144 * 0x44 + 0xc) = *(undefined4 *)(iVar30 + 0x2c);
            *(undefined4 *)(this + local_144 * 0x44 + 0x10) = *(undefined4 *)(iVar30 + 0x30);
            uVar36 = *(undefined4 *)(iVar30 + 0x34);
            *(undefined4 *)(this + local_144 * 0x44 + 0x18) = 0;
            *(undefined4 *)(this + local_144 * 0x44 + 0x14) = uVar36;
          }
LAB_0075fbe1:
          iVar30 = *(int *)(this + 0x4404);
          iVar23 = local_144;
LAB_0075fbe7:
          local_144 = iVar23;
          local_144 = local_144 + 1;
          if (iVar30 <= local_144) goto LAB_007604df;
        }
        *(undefined4 *)(this + local_144 * 0x44 + 0x18) = 0;
        CNavArea::ComputePortal
                  (*(CNavArea **)(this + iVar23 * 0x44 + 4),
                   *(undefined4 *)(this + local_144 * 0x44 + 4),iVar30,
                   this + local_144 * 0x44 + 0x38,this + local_144 * 0x44 + 0x44);
        (**(code **)(*(int *)this + 0x70))
                  (this,param_1,*(undefined4 *)(this + iVar23 * 0x44 + 4),this + iVar23 * 0x44 + 0xc
                   ,*(undefined4 *)(this + local_144 * 0x44 + 4),
                   *(undefined4 *)(this + local_144 * 0x44 + 8),this + local_144 * 0x44 + 0xc);
        lVar39 = (longdouble)
                 CNavArea::GetZ(*(CNavArea **)(this + iVar23 * 0x44 + 4),
                                *(float *)(this + local_144 * 0x44 + 0xc),
                                *(float *)(this + local_144 * 0x44 + 0x10));
        *(float *)(this + local_144 * 0x44 + 0x14) = (float)lVar39;
        lVar39 = (longdouble)
                 CNavArea::GetZ(*(CNavArea **)(this + iVar23 * 0x44 + 4),
                                *(float *)(this + iVar23 * 0x44 + 0xc),
                                *(float *)(this + iVar23 * 0x44 + 0x10));
        lVar40 = (longdouble)
                 CNavArea::GetZ(*(CNavArea **)(this + local_144 * 0x44 + 4),
                                *(float *)(this + local_144 * 0x44 + 0xc),
                                *(float *)(this + local_144 * 0x44 + 0x10));
        lVar41 = (longdouble)(**(code **)(*piVar22 + 0x130))(piVar22);
        if ((float)lVar39 - (float)lVar40 <= (float)lVar41) goto LAB_0075fbe1;
        iVar30 = *(int *)(this + local_144 * 0x44 + 8);
        if (iVar30 == 1) {
          local_128 = 0.0;
          local_124 = 1.0;
        }
        else if (iVar30 < 2) {
          if (iVar30 == 0) {
            local_128 = -1.0;
            local_124 = 0.0;
          }
        }
        else if (iVar30 == 2) {
          local_128 = 1.0;
          local_124 = 0.0;
        }
        else if (iVar30 == 3) {
          local_128 = 0.0;
          local_124 = -1.0;
        }
        if (piVar21 == (int *)0x0) {
          fVar42 = 1.0;
        }
        else {
          lVar39 = (longdouble)(**(code **)(*piVar21 + 0x124))(piVar21);
          fVar42 = (float)lVar39;
        }
        local_110 = 0.0;
        fVar42 = fVar42 * 0.5;
        do {
          local_114 = local_128 * local_110;
          local_118 = local_110 * local_124;
          fVar2 = *(float *)(this + local_144 * 0x44 + 0x10);
          fVar3 = *(float *)(this + local_144 * 0x44 + 0x14);
          fVar15 = *(float *)(this + local_144 * 0x44 + 0xc);
          pIVar24 = (IHandleEntity *)(**(code **)(*(int *)param_1 + 0xb4))(param_1);
          CTraceFilterSimple::CTraceFilterSimple
                    ((CTraceFilterSimple *)&local_dc,pIVar24,0,IgnoreActorsTraceFilterFunction);
          local_dc = &PTR_ShouldHitEntity_00c23430;
          local_cc = fVar15 + local_118;
          local_bc = 0;
          local_b8 = 0;
          local_8c = 0;
          local_b4 = (fVar3 - local_12c) - fVar3;
          local_ac = 0;
          local_a8 = 0;
          local_87 = local_b4 * local_b4 != 0.0;
          local_c8 = fVar2 + local_114;
          local_c4 = fVar3 + fVar42;
          local_a4 = -fVar42;
          local_9c = fVar44;
          local_98 = fVar44;
          local_94 = fVar42;
          local_88 = fVar42 * fVar42 + fVar44 * fVar44 + fVar44 * fVar44 < 1e-06;
          (**(code **)(*enginetrace + 0x14))
                    (enginetrace,(Vector *)&local_cc,0x202400b,(CTraceFilterSimple *)&local_dc,
                     &local_70);
          if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
            DebugDrawLine((Vector *)&local_70,(Vector *)&local_64,0xff,0xff,0,true,-1.0);
          }
          if (1.0 <= local_44) goto LAB_0076003d;
          local_110 = local_110 + fVar43 * 0.25;
        } while (local_110 <= 75.0);
        local_114 = local_128 * local_110;
        local_118 = local_124 * local_110;
LAB_0076003d:
        local_cc = local_118 + *(float *)(this + local_144 * 0x44 + 0xc);
        local_c4 = *(float *)(this + local_144 * 0x44 + 0x14);
        local_c8 = local_114 + *(float *)(this + local_144 * 0x44 + 0x10);
        lVar39 = (longdouble)
                 CNavArea::GetZ(*(CNavArea **)(this + local_144 * 0x44 + 4),
                                *(float *)(this + local_144 * 0x44 + 0xc),
                                *(float *)(this + local_144 * 0x44 + 0x10));
        local_68 = (float)lVar39;
        local_70 = local_cc;
        local_6c = local_c8;
        cVar20 = INextBot::IsDebugging(param_1,4);
        if (cVar20 != '\0') {
          NDebugOverlay::Cross3D((Vector *)&local_cc,5.0,0xff,0,0,true,5.0);
          NDebugOverlay::Cross3D((Vector *)&local_70,5.0,0,0xff,0,true,5.0);
          NDebugOverlay::HorzArrow
                    ((Vector *)&local_cc,(Vector *)&local_70,5.0,0xff,100,0,0xff,true,5.0);
        }
        cVar20 = CNavMesh::GetGroundHeight
                           (TheNavMesh,(Vector *)&local_cc,(float *)&local_dc,(Vector *)0x0);
        if (((cVar20 == '\0') || (local_c4 <= local_12c + (float)local_dc)) ||
           ((piVar25 = (int *)(**(code **)(*(int *)this + 0x58))(this,this + local_144 * 0x44 + 4),
            piVar25 != (int *)0x0 &&
            (local_12c + (float)local_dc < *(float *)(*piVar25 + 0x34) ||
             local_12c + (float)local_dc == *(float *)(*piVar25 + 0x34))))) goto LAB_0075fbe1;
        *(float *)(this + local_144 * 0x44 + 0xc) = local_cc;
        uVar36 = *(undefined4 *)(this + local_144 * 0x44 + 0x24);
        uVar4 = *(undefined4 *)(this + local_144 * 0x44 + 0x28);
        *(float *)(this + local_144 * 0x44 + 0x10) = local_c8;
        uVar5 = *(undefined4 *)(this + local_144 * 0x44 + 0x20);
        *(undefined4 *)(this + local_144 * 0x44 + 0x1c) = 1;
        uVar6 = *(undefined4 *)(this + local_144 * 0x44 + 0x2c);
        *(float *)(this + local_144 * 0x44 + 0x14) = local_c4;
        uVar7 = *(undefined4 *)(this + local_144 * 0x44 + 0x34);
        uVar16 = *(undefined4 *)(this + local_144 * 0x44 + 4);
        uVar8 = *(undefined4 *)(this + local_144 * 0x44 + 0x30);
        uVar17 = *(undefined4 *)(this + local_144 * 0x44 + 8);
        uVar9 = *(undefined4 *)(this + local_144 * 0x44 + 0x3c);
        uVar10 = *(undefined4 *)(this + local_144 * 0x44 + 0x38);
        uVar11 = *(undefined4 *)(this + local_144 * 0x44 + 0x40);
        uVar18 = *(undefined4 *)(this + local_144 * 0x44 + 0x18);
        uVar12 = *(undefined4 *)(this + local_144 * 0x44 + 0x44);
        iVar23 = local_144 + 1;
        iVar30 = *(int *)(this + 0x4404);
        if (0xfe < iVar30) goto LAB_0075fbe7;
        if (iVar23 < iVar30) {
          local_110 = (float)(iVar30 + -1);
          pPVar32 = this + (int)local_110 * 0x44 + 4;
          pPVar29 = this + iVar30 * 0x44 + 4;
          pPVar31 = pPVar32 + 0x1c;
          pPVar34 = pPVar32 + 8;
          pPVar35 = pPVar32 + 0x34;
          while( true ) {
            *(undefined4 *)pPVar29 = *(undefined4 *)pPVar32;
            *(undefined4 *)(pPVar29 + 4) = *(undefined4 *)(pPVar32 + 4);
            *(undefined4 *)(pPVar29 + 8) = *(undefined4 *)pPVar34;
            *(undefined4 *)(pPVar29 + 0xc) = *(undefined4 *)(pPVar34 + 4);
            *(undefined4 *)(pPVar29 + 0x10) = *(undefined4 *)(pPVar34 + 8);
            *(undefined4 *)(pPVar29 + 0x14) = *(undefined4 *)(pPVar32 + 0x14);
            *(undefined4 *)(pPVar29 + 0x18) = *(undefined4 *)(pPVar32 + 0x18);
            *(undefined4 *)(pPVar29 + 0x1c) = *(undefined4 *)pPVar31;
            *(undefined4 *)(pPVar29 + 0x20) = *(undefined4 *)(pPVar31 + 4);
            *(undefined4 *)(pPVar29 + 0x24) = *(undefined4 *)(pPVar31 + 8);
            *(undefined4 *)(pPVar29 + 0x28) = *(undefined4 *)(pPVar32 + 0x28);
            *(undefined4 *)(pPVar29 + 0x2c) = *(undefined4 *)(pPVar32 + 0x2c);
            *(undefined4 *)(pPVar29 + 0x30) = *(undefined4 *)(pPVar32 + 0x30);
            *(undefined4 *)(pPVar29 + 0x34) = *(undefined4 *)pPVar35;
            *(undefined4 *)(pPVar29 + 0x38) = *(undefined4 *)(pPVar35 + 4);
            *(undefined4 *)(pPVar29 + 0x3c) = *(undefined4 *)(pPVar35 + 8);
            *(undefined4 *)(pPVar29 + 0x40) = *(undefined4 *)(pPVar32 + 0x40);
            if (local_110 == (float)iVar23) break;
            local_110 = (float)((int)local_110 + -1);
            pPVar29 = pPVar32;
            pPVar31 = pPVar31 + -0x44;
            pPVar32 = pPVar32 + -0x44;
            pPVar34 = pPVar34 + -0x44;
            pPVar35 = pPVar35 + -0x44;
          }
          iVar30 = *(int *)(this + 0x4404);
        }
        *(int *)(this + 0x4404) = iVar30 + 1;
        *(undefined4 *)(this + iVar23 * 0x44 + 4) = uVar16;
        *(undefined ***)(this + iVar23 * 0x44 + 0x14) = local_dc;
        *(float *)(this + iVar23 * 0x44 + 0xc) = local_70;
        *(undefined4 *)(this + iVar23 * 0x44 + 0x24) = uVar36;
        *(undefined4 *)(this + iVar23 * 0x44 + 8) = uVar17;
        *(undefined4 *)(this + iVar23 * 0x44 + 0x28) = uVar4;
        *(float *)(this + iVar23 * 0x44 + 0x10) = local_6c;
        *(undefined4 *)(this + iVar23 * 0x44 + 0x2c) = uVar6;
        *(undefined4 *)(this + iVar23 * 0x44 + 0x18) = uVar18;
        *(undefined4 *)(this + iVar23 * 0x44 + 0x1c) = 0;
        *(undefined4 *)(this + iVar23 * 0x44 + 0x20) = uVar5;
        *(undefined4 *)(this + iVar23 * 0x44 + 0x30) = uVar8;
        *(undefined4 *)(this + iVar23 * 0x44 + 0x34) = uVar7;
        *(undefined4 *)(this + iVar23 * 0x44 + 0x38) = uVar10;
        *(undefined4 *)(this + iVar23 * 0x44 + 0x3c) = uVar9;
        *(undefined4 *)(this + iVar23 * 0x44 + 0x40) = uVar11;
        *(undefined4 *)(this + iVar23 * 0x44 + 0x44) = uVar12;
        iVar30 = *(int *)(this + 0x4404);
        local_144 = local_144 + 2;
      } while (local_144 < iVar30);
LAB_007604df:
      if (1 < iVar30) {
        local_110 = 0.0;
        do {
          iVar23 = (int)local_110 + 1;
          if (((0x7ffffffb < *(int *)(this + (int)local_110 * 0x44 + 8) - 4U) ||
              (*(int *)(this + (int)local_110 * 0x44 + 8) == 9)) &&
             ((*(int *)(this + iVar23 * 0x44 + 8) < 4 &&
              (*(int *)(this + iVar23 * 0x44 + 0x1c) == 0)))) {
                    /* try { // try from 00760593 to 007606e7 has its CatchHandler @ 00761640 */
            CNavArea::GetClosestPointOnArea
                      (*(CNavArea **)(this + iVar23 * 0x44 + 4),
                       (Vector *)(this + (int)local_110 * 0x44 + 0xc),(Vector *)&local_e8);
            CNavArea::GetClosestPointOnArea
                      (*(CNavArea **)(this + (int)local_110 * 0x44 + 4),(Vector *)&local_e8,
                       (Vector *)&local_f4);
            cVar20 = INextBot::IsDebugging(param_1,4);
            if (cVar20 != '\0') {
              NDebugOverlay::Line((Vector *)&local_f4,(Vector *)&local_e8,0xff,0,0xff,true,5.0);
            }
            if (((local_f0 - local_e4) * (local_f0 - local_e4) +
                 (local_f4 - local_e8) * (local_f4 - local_e8) <= 2256.25) ||
               (fVar43 = (local_e0 - local_ec) * 0.5,
               (local_e4 - local_f0) * (local_e4 - local_f0) +
               (local_e8 - local_f4) * (local_e8 - local_f4) <= fVar43 * fVar43)) {
              if (local_12c < local_e0 - local_ec) {
                iVar30 = *(int *)(this + iVar23 * 0x44 + 4);
                *(undefined4 *)(this + iVar23 * 0x44 + 0xc) = *(undefined4 *)(iVar30 + 0x2c);
                *(undefined4 *)(this + iVar23 * 0x44 + 0x10) = *(undefined4 *)(iVar30 + 0x30);
                *(undefined4 *)(this + iVar23 * 0x44 + 0x14) = *(undefined4 *)(iVar30 + 0x34);
                pPVar29 = this + (int)local_110 * 0x44 + 4;
                pfVar37 = &local_70;
                for (iVar30 = 0x11; iVar30 != 0; iVar30 = iVar30 + -1) {
                  *pfVar37 = *(float *)pPVar29;
                  pPVar29 = pPVar29 + (uint)bVar38 * -8 + 4;
                  pfVar37 = pfVar37 + (uint)bVar38 * -2 + 1;
                }
                CNavArea::GetClosestPointOnArea
                          (*(CNavArea **)(this + (int)local_110 * 0x44 + 4),
                           (Vector *)(this + iVar23 * 0x44 + 0xc),(Vector *)&local_cc);
                local_58 = 2;
                local_68 = local_cc;
                local_64 = local_c8;
                local_60 = local_c4;
                cVar20 = INextBot::IsDebugging(param_1,4);
                if (cVar20 != '\0') {
                  NDebugOverlay::Cross3D((Vector *)&local_68,15.0,0xff,100,0xff,true,3.0);
                }
                iVar30 = *(int *)(this + 0x4404);
                if (iVar30 < 0xff) {
                  if (iVar23 < iVar30) {
                    local_120 = iVar30 + -1;
                    pPVar32 = this + local_120 * 0x44 + 4;
                    pPVar29 = this + iVar30 * 0x44 + 4;
                    pPVar31 = pPVar32 + 0x34;
                    pPVar34 = pPVar32 + 8;
                    pPVar35 = pPVar32 + 0x1c;
                    while( true ) {
                      *(undefined4 *)pPVar29 = *(undefined4 *)pPVar32;
                      *(undefined4 *)(pPVar29 + 4) = *(undefined4 *)(pPVar32 + 4);
                      *(undefined4 *)(pPVar29 + 8) = *(undefined4 *)pPVar34;
                      *(undefined4 *)(pPVar29 + 0xc) = *(undefined4 *)(pPVar34 + 4);
                      *(undefined4 *)(pPVar29 + 0x10) = *(undefined4 *)(pPVar34 + 8);
                      *(undefined4 *)(pPVar29 + 0x14) = *(undefined4 *)(pPVar32 + 0x14);
                      *(undefined4 *)(pPVar29 + 0x18) = *(undefined4 *)(pPVar32 + 0x18);
                      *(undefined4 *)(pPVar29 + 0x1c) = *(undefined4 *)pPVar35;
                      *(undefined4 *)(pPVar29 + 0x20) = *(undefined4 *)(pPVar35 + 4);
                      *(undefined4 *)(pPVar29 + 0x24) = *(undefined4 *)(pPVar35 + 8);
                      *(undefined4 *)(pPVar29 + 0x28) = *(undefined4 *)(pPVar32 + 0x28);
                      *(undefined4 *)(pPVar29 + 0x2c) = *(undefined4 *)(pPVar32 + 0x2c);
                      *(undefined4 *)(pPVar29 + 0x30) = *(undefined4 *)(pPVar32 + 0x30);
                      *(undefined4 *)(pPVar29 + 0x34) = *(undefined4 *)pPVar31;
                      *(undefined4 *)(pPVar29 + 0x38) = *(undefined4 *)(pPVar31 + 4);
                      *(undefined4 *)(pPVar29 + 0x3c) = *(undefined4 *)(pPVar31 + 8);
                      *(undefined4 *)(pPVar29 + 0x40) = *(undefined4 *)(pPVar32 + 0x40);
                      if (local_120 == iVar23) break;
                      local_120 = local_120 + -1;
                      pPVar29 = pPVar32;
                      pPVar31 = pPVar31 + -0x44;
                      pPVar32 = pPVar32 + -0x44;
                      pPVar34 = pPVar34 + -0x44;
                      pPVar35 = pPVar35 + -0x44;
                    }
                    iVar30 = *(int *)(this + 0x4404);
                  }
                  *(int *)(this + 0x4404) = iVar30 + 1;
                  *(float *)(this + iVar23 * 0x44 + 4) = local_70;
                  *(float *)(this + iVar23 * 0x44 + 0xc) = local_68;
                  *(float *)(this + iVar23 * 0x44 + 8) = local_6c;
                  *(float *)(this + iVar23 * 0x44 + 0x30) = local_44;
                  *(float *)(this + iVar23 * 0x44 + 0x10) = local_64;
                  *(undefined4 *)(this + iVar23 * 0x44 + 0x34) = local_40;
                  *(undefined4 *)(this + iVar23 * 0x44 + 0x18) = local_5c;
                  *(undefined4 *)(this + iVar23 * 0x44 + 0x38) = local_3c;
                  *(float *)(this + iVar23 * 0x44 + 0x14) = local_60;
                  *(undefined4 *)(this + iVar23 * 0x44 + 0x3c) = local_38;
                  *(undefined4 *)(this + iVar23 * 0x44 + 0x1c) = local_58;
                  *(undefined4 *)(this + iVar23 * 0x44 + 0x40) = local_34;
                  *(undefined4 *)(this + iVar23 * 0x44 + 0x20) = local_54;
                  *(undefined4 *)(this + iVar23 * 0x44 + 0x24) = local_50;
                  *(undefined4 *)(this + iVar23 * 0x44 + 0x28) = local_4c;
                  *(undefined4 *)(this + iVar23 * 0x44 + 0x2c) = local_48;
                  *(undefined4 *)(this + iVar23 * 0x44 + 0x44) = local_30;
                  iVar30 = *(int *)(this + 0x4404);
                }
              }
              else {
                    /* try { // try from 00760e2f to 007615f6 has its CatchHandler @ 00761640 */
                if ((((*(int *)(this + (int)local_110 * 0x44 + 0x1c) != 6) &&
                     (*(int *)(this + (int)local_110 * 0x44 + 0x1c) != 0)) ||
                    (3 < *(int *)(this + iVar23 * 0x44 + 8))) ||
                   (cVar20 = CNavArea::IsLineToPointWithinPortal
                                       (*(CNavArea **)(this + (int)local_110 * 0x44 + 4),
                                        *(undefined4 *)(this + iVar23 * 0x44 + 4),
                                        *(int *)(this + iVar23 * 0x44 + 8),
                                        (Vector *)(this + (int)local_110 * 0x44 + 0xc),
                                        this + iVar23 * 0x44 + 0xc,fVar44), cVar20 != '\0')) {
                  iVar30 = *(int *)(this + 0x4404);
                  goto LAB_007604fe;
                }
                pPVar29 = this + (int)local_110 * 0x44 + 4;
                pfVar37 = &local_70;
                for (iVar30 = 0x11; iVar30 != 0; iVar30 = iVar30 + -1) {
                  *pfVar37 = *(float *)pPVar29;
                  pPVar29 = pPVar29 + (uint)bVar38 * -8 + 4;
                  pfVar37 = pfVar37 + (uint)bVar38 * -2 + 1;
                }
                uVar19 = *(uint *)(this + iVar23 * 0x44 + 8);
                iVar30 = *(int *)(this + (int)local_110 * 0x44 + 4);
                if ((uVar19 & 0xfffffffd) == 0) {
                  fVar43 = *(float *)(iVar30 + 0x14) - *(float *)(iVar30 + 8);
                }
                else {
                  fVar43 = *(float *)(iVar30 + 0x10) - *(float *)(iVar30 + 4);
                }
                fVar43 = fVar43 * 0.5 * 0.8;
                local_68 = *(float *)(this + iVar23 * 0x44 + 0xc);
                local_64 = *(float *)(this + iVar23 * 0x44 + 0x10);
                local_60 = *(float *)(this + iVar23 * 0x44 + 0x14);
                if (fVar44 <= fVar43) {
                  fVar43 = fVar44;
                }
                iVar30 = *(int *)(this + iVar23 * 0x44 + 4);
                if (uVar19 == 1) {
                  local_68 = *(float *)(iVar30 + 4) - fVar43;
                }
                else if ((int)uVar19 < 2) {
                  if (uVar19 == 0) {
                    local_64 = fVar43 + *(float *)(iVar30 + 0x14);
                  }
                }
                else if (uVar19 == 2) {
                  local_64 = *(float *)(iVar30 + 8) - fVar43;
                }
                else if (uVar19 == 3) {
                  local_68 = fVar43 + *(float *)(iVar30 + 0x10);
                }
                local_58 = 0;
                cVar20 = INextBot::IsDebugging(param_1,4);
                if (cVar20 != '\0') {
                  NDebugOverlay::Cross3D((Vector *)&local_68,15.0,0xff,0,0xff,true,3.0);
                }
                local_128 = (float)local_34;
                local_130 = local_30;
                iVar30 = *(int *)(this + 0x4404);
                if (iVar30 < 0xff) {
                  if (iVar23 < iVar30) {
                    local_120 = iVar30 + -1;
                    pPVar32 = this + local_120 * 0x44 + 4;
                    pPVar29 = this + iVar30 * 0x44 + 4;
                    pPVar31 = pPVar32 + 0x1c;
                    pPVar34 = pPVar32 + 8;
                    pPVar35 = pPVar32 + 0x34;
                    while( true ) {
                      *(undefined4 *)pPVar29 = *(undefined4 *)pPVar32;
                      *(undefined4 *)(pPVar29 + 4) = *(undefined4 *)(pPVar32 + 4);
                      *(undefined4 *)(pPVar29 + 8) = *(undefined4 *)pPVar34;
                      *(undefined4 *)(pPVar29 + 0xc) = *(undefined4 *)(pPVar34 + 4);
                      *(undefined4 *)(pPVar29 + 0x10) = *(undefined4 *)(pPVar34 + 8);
                      *(undefined4 *)(pPVar29 + 0x14) = *(undefined4 *)(pPVar32 + 0x14);
                      *(undefined4 *)(pPVar29 + 0x18) = *(undefined4 *)(pPVar32 + 0x18);
                      *(undefined4 *)(pPVar29 + 0x1c) = *(undefined4 *)pPVar31;
                      *(undefined4 *)(pPVar29 + 0x20) = *(undefined4 *)(pPVar31 + 4);
                      *(undefined4 *)(pPVar29 + 0x24) = *(undefined4 *)(pPVar31 + 8);
                      *(undefined4 *)(pPVar29 + 0x28) = *(undefined4 *)(pPVar32 + 0x28);
                      *(undefined4 *)(pPVar29 + 0x2c) = *(undefined4 *)(pPVar32 + 0x2c);
                      *(undefined4 *)(pPVar29 + 0x30) = *(undefined4 *)(pPVar32 + 0x30);
                      *(undefined4 *)(pPVar29 + 0x34) = *(undefined4 *)pPVar35;
                      *(undefined4 *)(pPVar29 + 0x38) = *(undefined4 *)(pPVar35 + 4);
                      *(undefined4 *)(pPVar29 + 0x3c) = *(undefined4 *)(pPVar35 + 8);
                      *(undefined4 *)(pPVar29 + 0x40) = *(undefined4 *)(pPVar32 + 0x40);
                      if (local_120 == iVar23) break;
                      local_120 = local_120 + -1;
                      pPVar29 = pPVar32;
                      pPVar31 = pPVar31 + -0x44;
                      pPVar32 = pPVar32 + -0x44;
                      pPVar34 = pPVar34 + -0x44;
                      pPVar35 = pPVar35 + -0x44;
                    }
                    iVar30 = *(int *)(this + 0x4404);
                  }
                  *(int *)(this + 0x4404) = iVar30 + 1;
                  *(float *)(this + iVar23 * 0x44 + 4) = local_70;
                  *(float *)(this + iVar23 * 0x44 + 0xc) = local_68;
                  *(float *)(this + iVar23 * 0x44 + 8) = local_6c;
                  *(float *)(this + iVar23 * 0x44 + 0x30) = local_44;
                  *(float *)(this + iVar23 * 0x44 + 0x10) = local_64;
                  *(undefined4 *)(this + iVar23 * 0x44 + 0x34) = local_40;
                  *(undefined4 *)(this + iVar23 * 0x44 + 0x18) = local_5c;
                  *(undefined4 *)(this + iVar23 * 0x44 + 0x38) = local_3c;
                  *(float *)(this + iVar23 * 0x44 + 0x14) = local_60;
                  *(undefined4 *)(this + iVar23 * 0x44 + 0x20) = local_54;
                  *(undefined4 *)(this + iVar23 * 0x44 + 0x1c) = local_58;
                  *(undefined4 *)(this + iVar23 * 0x44 + 0x24) = local_50;
                  *(undefined4 *)(this + iVar23 * 0x44 + 0x28) = local_4c;
                  *(undefined4 *)(this + iVar23 * 0x44 + 0x2c) = local_48;
                  uVar36 = local_38;
                  goto LAB_007609d1;
                }
              }
            }
            else {
              CNavArea::GetClosestPointOnArea
                        (*(CNavArea **)(this + iVar23 * 0x44 + 4),
                         (Vector *)(this + iVar23 * 0x44 + 0xc),(Vector *)&local_dc);
              CNavArea::GetClosestPointOnArea
                        (*(CNavArea **)(this + (int)local_110 * 0x44 + 4),(Vector *)&local_dc,
                         (Vector *)&local_cc);
              local_70 = (float)local_dc - local_cc;
              local_6c = local_d8 - local_c8;
              local_68 = local_d4 - local_c4;
              VectorNormalize((Vector *)&local_70);
              *(float *)(this + iVar23 * 0x44 + 0xc) = (float)local_dc + local_70 * fVar44;
              *(float *)(this + iVar23 * 0x44 + 0x10) = local_d8 + local_6c * fVar44;
              *(float *)(this + iVar23 * 0x44 + 0x14) = fVar44 * local_68 + local_d4;
              uVar4 = *(undefined4 *)(this + (int)local_110 * 0x44 + 0x24);
              uVar11 = *(undefined4 *)(this + (int)local_110 * 0x44 + 4);
              uVar5 = *(undefined4 *)(this + (int)local_110 * 0x44 + 0x28);
              uVar6 = *(undefined4 *)(this + (int)local_110 * 0x44 + 0x20);
              uVar7 = *(undefined4 *)(this + (int)local_110 * 0x44 + 0x2c);
              uVar12 = *(undefined4 *)(this + (int)local_110 * 0x44 + 8);
              uVar8 = *(undefined4 *)(this + (int)local_110 * 0x44 + 0x30);
              uVar9 = *(undefined4 *)(this + (int)local_110 * 0x44 + 0x34);
              uVar16 = *(undefined4 *)(this + (int)local_110 * 0x44 + 0x18);
              uVar10 = *(undefined4 *)(this + (int)local_110 * 0x44 + 0x38);
              uVar36 = *(undefined4 *)(this + (int)local_110 * 0x44 + 0x3c);
              local_128 = *(float *)(this + (int)local_110 * 0x44 + 0x40);
              local_130 = *(undefined4 *)(this + (int)local_110 * 0x44 + 0x44);
              iVar30 = *(int *)(this + 0x4404);
              if (iVar30 < 0xff) {
                if (iVar23 < iVar30) {
                  local_120 = iVar30 + -1;
                  pPVar32 = this + local_120 * 0x44 + 4;
                  pPVar29 = this + iVar30 * 0x44 + 4;
                  pPVar31 = pPVar32 + 0x34;
                  pPVar34 = pPVar32 + 0x1c;
                  pPVar35 = pPVar32 + 8;
                  while( true ) {
                    *(undefined4 *)pPVar29 = *(undefined4 *)pPVar32;
                    *(undefined4 *)(pPVar29 + 4) = *(undefined4 *)(pPVar32 + 4);
                    *(undefined4 *)(pPVar29 + 8) = *(undefined4 *)pPVar35;
                    *(undefined4 *)(pPVar29 + 0xc) = *(undefined4 *)(pPVar35 + 4);
                    *(undefined4 *)(pPVar29 + 0x10) = *(undefined4 *)(pPVar35 + 8);
                    *(undefined4 *)(pPVar29 + 0x14) = *(undefined4 *)(pPVar32 + 0x14);
                    *(undefined4 *)(pPVar29 + 0x18) = *(undefined4 *)(pPVar32 + 0x18);
                    *(undefined4 *)(pPVar29 + 0x1c) = *(undefined4 *)pPVar34;
                    *(undefined4 *)(pPVar29 + 0x20) = *(undefined4 *)(pPVar34 + 4);
                    *(undefined4 *)(pPVar29 + 0x24) = *(undefined4 *)(pPVar34 + 8);
                    *(undefined4 *)(pPVar29 + 0x28) = *(undefined4 *)(pPVar32 + 0x28);
                    *(undefined4 *)(pPVar29 + 0x2c) = *(undefined4 *)(pPVar32 + 0x2c);
                    *(undefined4 *)(pPVar29 + 0x30) = *(undefined4 *)(pPVar32 + 0x30);
                    *(undefined4 *)(pPVar29 + 0x34) = *(undefined4 *)pPVar31;
                    *(undefined4 *)(pPVar29 + 0x38) = *(undefined4 *)(pPVar31 + 4);
                    *(undefined4 *)(pPVar29 + 0x3c) = *(undefined4 *)(pPVar31 + 8);
                    *(undefined4 *)(pPVar29 + 0x40) = *(undefined4 *)(pPVar32 + 0x40);
                    if (local_120 == iVar23) break;
                    local_120 = local_120 + -1;
                    pPVar29 = pPVar32;
                    pPVar31 = pPVar31 + -0x44;
                    pPVar32 = pPVar32 + -0x44;
                    pPVar34 = pPVar34 + -0x44;
                    pPVar35 = pPVar35 + -0x44;
                  }
                  iVar30 = *(int *)(this + 0x4404);
                }
                *(int *)(this + 0x4404) = iVar30 + 1;
                *(undefined4 *)(this + iVar23 * 0x44 + 4) = uVar11;
                *(float *)(this + iVar23 * 0x44 + 0xc) = local_cc - local_70 * fVar44;
                *(undefined4 *)(this + iVar23 * 0x44 + 8) = uVar12;
                *(undefined4 *)(this + iVar23 * 0x44 + 0x24) = uVar4;
                *(float *)(this + iVar23 * 0x44 + 0x10) = local_c8 - local_6c * fVar44;
                *(undefined4 *)(this + iVar23 * 0x44 + 0x28) = uVar5;
                *(float *)(this + iVar23 * 0x44 + 0x14) = local_c4 - local_68 * fVar44;
                *(undefined4 *)(this + iVar23 * 0x44 + 0x2c) = uVar7;
                *(undefined4 *)(this + iVar23 * 0x44 + 0x18) = uVar16;
                *(undefined4 *)(this + iVar23 * 0x44 + 0x30) = uVar8;
                *(undefined4 *)(this + iVar23 * 0x44 + 0x1c) = 3;
                *(undefined4 *)(this + iVar23 * 0x44 + 0x34) = uVar9;
                *(undefined4 *)(this + iVar23 * 0x44 + 0x20) = uVar6;
                *(undefined4 *)(this + iVar23 * 0x44 + 0x38) = uVar10;
LAB_007609d1:
                *(undefined4 *)(this + iVar23 * 0x44 + 0x3c) = uVar36;
                *(float *)(this + iVar23 * 0x44 + 0x40) = local_128;
                *(undefined4 *)(this + iVar23 * 0x44 + 0x44) = local_130;
                iVar30 = *(int *)(this + 0x4404);
              }
            }
            iVar23 = (int)local_110 + 2;
          }
LAB_007604fe:
          local_110 = (float)iVar23;
        } while (iVar23 < iVar30 + -1);
      }
    }
    uVar36 = 1;
  }
  iVar30 = _DAT_0105db00;
  if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
     (iVar23 = ThreadGetCurrentId(), iVar30 == iVar23)) {
    cVar20 = CVProfNode::ExitScope();
    if (cVar20 != '\0') {
      _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
    }
    DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
  }
  if (local_f8 != 0) {
    (**(code **)(local_f8 + 0x54))(local_f8,local_100,local_fc,0,0,0);
  }
  return uVar36;
}

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)