L L4D2node

BoomerAttack::Update

0x00a70d60 · 4974 bytes · __thiscall

_ZN12BoomerAttack6UpdateEP6Boomerf

Decompiled

undefined (3 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* BoomerAttack::Update(Boomer*, float) */

BoomerAttack * __thiscall BoomerAttack::Update(BoomerAttack *this,Boomer *param_1,float param_2)

{
  float fVar1;
  uint uVar2;
  code *pcVar3;
  bool bVar4;
  bool bVar5;
  char cVar6;
  Boomer BVar7;
  int *piVar8;
  int *piVar9;
  int *piVar10;
  uint *puVar11;
  int *piVar12;
  CBaseEntity *this_00;
  int iVar13;
  int iVar14;
  Boomer *pBVar15;
  int iVar16;
  TerrorNavArea *pTVar17;
  CNavArea *pCVar18;
  BoomerSelfDestruct *this_01;
  Vector *pVVar19;
  BoomerRetreatToCover *this_02;
  BoomerVomitOnVictim *this_03;
  CTerrorPlayer *pCVar20;
  IPathCost *pIVar21;
  undefined *puVar22;
  CBaseEntity *pCVar23;
  longdouble lVar24;
  longdouble lVar25;
  char *local_74;
  int local_64;
  int local_54;
  int local_50;
  int local_4c;
  int local_48;
  int local_44;
  int local_40;
  int local_3c;
  int local_38;
  undefined **local_34;
  CBaseEntity *local_30;
  CBaseEntity *local_2c;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  
  piVar8 = (int *)(**(code **)(*(int *)param_2 + 0x9b4))();
  piVar9 = (int *)(**(code **)(*(int *)param_2 + 0x9b0))();
  pCVar20 = (CTerrorPlayer *)0x0;
  uVar2 = *(uint *)(param_1 + 0x34);
  if (((uVar2 != 0xffffffff) &&
      (puVar22 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar22 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar22 + 8) == uVar2 >> 0xc)) {
    pCVar20 = *(CTerrorPlayer **)(puVar22 + 4);
  }
  piVar10 = (int *)BossZombiePlayerBot::ChooseVictim
                             ((BossZombiePlayerBot *)param_2,pCVar20,0,(CBaseCombatCharacter *)0x0);
  if (piVar10 == (int *)0x0) {
    *(undefined4 *)(param_1 + 0x34) = 0xffffffff;
    goto LAB_00a70e14;
  }
  puVar11 = (uint *)(**(code **)(*piVar10 + 0xc))();
  puVar22 = g_pEntityList;
  uVar2 = *puVar11;
  *(uint *)(param_1 + 0x34) = uVar2;
  if (((uVar2 == 0xffffffff) ||
      (puVar22 = puVar22 + (uVar2 & 0xfff) * 0x10, puVar22 == (undefined *)0xfffffffc)) ||
     ((*(uint *)(puVar22 + 8) != uVar2 >> 0xc ||
      ((*(int **)(puVar22 + 4) == (int *)0x0 ||
       (cVar6 = (**(code **)(**(int **)(puVar22 + 4) + 300))(), cVar6 == '\0'))))))
  goto LAB_00a70e14;
  uVar2 = *(uint *)((int)param_2 + 0x30bc);
  if ((uVar2 == 0xffffffff) ||
     (((puVar22 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar22 == (undefined *)0xfffffffc ||
       (*(uint *)(puVar22 + 8) != uVar2 >> 0xc)) ||
      (piVar10 = *(int **)(puVar22 + 4), piVar10 == (int *)0x0)))) {
    *(undefined4 *)this = 3;
    *(undefined4 *)(this + 4) = 0;
    *(char **)(this + 8) = "No ability!";
    return this;
  }
  if (0 < *(int *)(param_1 + 0x443c)) {
    piVar12 = (int *)(**(code **)(*(int *)param_2 + 0x9b0))();
    cVar6 = (**(code **)(*piVar12 + 0x114))();
    if (cVar6 != '\0') {
      iVar13 = (int)param_2 + 0x4028;
      local_34 = &PTR_operator___00d20e60;
      local_30 = (CBaseEntity *)iVar13;
      local_28 = (**(code **)(*(int *)((int)param_2 + 0x4028) + 0xc0))();
      pCVar23 = (CBaseEntity *)(**(code **)(*(int *)((int)param_2 + 0x4028) + 0xb4))();
      iVar14 = (**(code **)(*(int *)pCVar23 + 0x14c))();
      local_24 = 0x3f800000;
      if (iVar14 != 0) {
        local_24 = *(undefined4 *)(iVar14 + 0x1cec);
      }
      cVar6 = (**(code **)(*(int *)pCVar23 + 0x16c))();
      local_2c = (CBaseEntity *)0x0;
      if (cVar6 != '\0') {
        local_2c = pCVar23;
      }
      iVar14 = CBaseEntity::GetTeamNumber(pCVar23);
      local_20 = 9;
      if (iVar14 == 3) {
        local_20 = (**(code **)(*(int *)pCVar23 + 0x544))();
      }
      local_64 = 0;
      uVar2 = *(uint *)(param_1 + 0x34);
      if (((uVar2 != 0xffffffff) &&
          (puVar22 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar22 != (undefined *)0xfffffffc)) &&
         (*(uint *)(puVar22 + 8) == uVar2 >> 0xc)) {
        local_64 = *(int *)(puVar22 + 4);
      }
      pBVar15 = param_1 + 0x38;
      piVar8 = (int *)(**(code **)(*(int *)((int)param_2 + 0x4028) + 0xc0))();
      cVar6 = (**(code **)(*(int *)((int)param_2 + 0x4028) + 0x104))();
      if (((cVar6 == '\0') && (cVar6 = (**(code **)(*piVar8 + 0xd4))(), cVar6 == '\0')) &&
         ((cVar6 = (**(code **)(*(int *)(param_1 + 0x38) + 0x80))(), cVar6 == '\0' &&
          (cVar6 = (**(code **)(*(int *)(param_1 + 0x38) + 0x80))(), cVar6 == '\0')))) {
        (**(code **)(*(int *)(param_1 + 0x38) + 0x90))();
        piVar9 = (int *)&stack0xffffff50;
        local_4c = local_40;
        local_48 = local_3c;
        local_44 = local_38;
        pcVar3 = *(code **)(*piVar8 + 0x158);
        (**(code **)(*piVar8 + 300))();
        cVar6 = (*pcVar3)();
        if (cVar6 != '\0') {
          if (*(int *)(DirectChaseNavCheck._28_4_ + 0x30) != 0) {
            pVVar19 = (Vector *)(**(code **)(*piVar8 + 300))();
            cVar6 = CNavMesh::DoesRayStayWithinMesh(TheNavMesh,pVVar19,(Vector *)&local_40);
            if (cVar6 == '\0') goto LAB_00a71e1e;
          }
          (**(code **)(*piVar8 + 0x120))();
          (**(code **)(*piVar8 + 0xb4))();
          piVar8 = (int *)(**(code **)(*(int *)((int)param_2 + 0x4028) + 0xc4))();
          (**(code **)(*piVar8 + 0xc4))();
          (**(code **)(*(int *)(param_1 + 0x38) + 0x48))();
          param_1[0x4844] = (Boomer)0x1;
          goto LAB_00a715c1;
        }
LAB_00a71e1e:
        piVar8 = &local_4c;
        piVar9 = (int *)&stack0xffffff50;
      }
      else {
        piVar8 = (int *)0x0;
        piVar9 = (int *)&stack0xffffff54;
      }
      local_54 = 0;
      local_50 = 0;
      if (_towlower == 0) {
        local_38 = 0;
      }
      else {
        *piVar9 = _towlower;
        piVar9[1] = (int)&local_54;
        piVar9[0xb] = (int)"ChasePath::Update";
        piVar9[10] = (int)"NextBot";
        piVar9[9] = (int)"(%s)%s";
        piVar9[8] = (int)&ChasePath::Update(INextBot*,CBaseEntity*,IPathCost_const&,Vector*)::tm_fmt
        ;
        piVar9[7] = 0x68;
        piVar9[6] = (int)"/data/src/game/server/nextbot/path/nextbotchasepath.h";
        piVar9[5] = 0;
        piVar9[3] = 0;
        piVar9[4] = 0;
        piVar9[2] = 0;
        pcVar3 = *(code **)(_towlower + 0x50);
        piVar9[-1] = 0xa714e8;
        (*pcVar3)();
        local_38 = _towlower;
      }
      iVar14 = _DAT_0105db00;
      local_40 = local_54;
      local_3c = local_50;
      if ((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) {
                    /* try { // try from 00a71516 to 00a7151a has its CatchHandler @ 00a72165 */
        piVar9[-1] = 0xa7151b;
        iVar16 = ThreadGetCurrentId();
        if (iVar14 == iVar16) {
          if ((char *)*_DAT_0105d15c != "ChasePath::Update") {
            piVar9[4] = 4;
            piVar9[3] = (int)"NextBot";
            piVar9[2] = 0;
            piVar9[1] = (int)"ChasePath::Update";
            *piVar9 = (int)_DAT_0105d15c;
                    /* try { // try from 00a71980 to 00a719a3 has its CatchHandler @ 00a72165 */
            piVar9[-1] = 0xa71985;
            _DAT_0105d15c =
                 (int *)CVProfNode::GetSubNode
                                  ((char *)*piVar9,piVar9[1],(char *)piVar9[2],piVar9[3]);
          }
          puVar11 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
          *puVar11 = *puVar11 | 4;
          *piVar9 = (int)_DAT_0105d15c;
          piVar9[-1] = 0xa719a4;
          CVProfNode::EnterScope();
          DAT_0105d158 = '\0';
        }
      }
      piVar9[4] = (int)piVar8;
      piVar9[3] = (int)&local_34;
      piVar9[1] = iVar13;
      *piVar9 = (int)pBVar15;
      piVar9[2] = local_64;
                    /* try { // try from 00a7153f to 00a7154f has its CatchHandler @ 00a72144 */
      piVar9[-1] = 0xa71544;
      ChasePath::RefreshPath
                ((ChasePath *)*piVar9,(INextBot *)piVar9[1],(CBaseEntity *)piVar9[2],
                 (IPathCost *)piVar9[3],(Vector *)piVar9[4]);
      piVar9[1] = iVar13;
      *piVar9 = (int)pBVar15;
      piVar9[-1] = 0xa71550;
      PathFollower::Update((PathFollower *)*piVar9,(INextBot *)piVar9[1]);
      iVar14 = _DAT_0105db00;
      if ((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) {
        piVar9[-1] = 0xa7156e;
        iVar16 = ThreadGetCurrentId();
        if (iVar14 == iVar16) {
          *piVar9 = (int)_DAT_0105d15c;
          piVar9[-1] = 0xa71925;
          cVar6 = CVProfNode::ExitScope();
          if (cVar6 != '\0') {
            _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
          }
          DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
        }
      }
      if (local_38 != 0) {
        piVar9[5] = 0;
        piVar9[4] = 0;
        piVar9[3] = 0;
        *piVar9 = local_38;
        piVar9[1] = local_40;
        piVar9[2] = local_3c;
        pcVar3 = *(code **)(local_38 + 0x54);
        piVar9[-1] = 0xa715a9;
        (*pcVar3)();
      }
      iVar14 = *(int *)(param_1 + 0x38);
      *piVar9 = (int)pBVar15;
      pcVar3 = *(code **)(iVar14 + 0x44);
      piVar9[-1] = 0xa715b8;
      BVar7 = (Boomer)(*pcVar3)();
      param_1[0x4844] = BVar7;
LAB_00a715c1:
      piVar9[1] = iVar13;
      piVar9[2] = local_64;
      *piVar9 = (int)pBVar15;
      piVar9[-1] = 0xa715d7;
      DirectChasePath::NotifyVictim
                ((DirectChasePath *)*piVar9,(INextBot *)piVar9[1],(CBaseEntity *)piVar9[2]);
      *(undefined4 *)this = 0;
      *(undefined4 *)(this + 4) = 0;
      *(undefined4 *)(this + 8) = 0;
      return this;
    }
  }
  (**(code **)(*piVar8 + 0xc4))();
  if (((((*(int *)((int)param_2 + 0x4018) == 1) &&
        (uVar2 = *(uint *)((int)param_2 + 0x30bc), uVar2 != 0xffffffff)) &&
       (puVar22 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar22 != (undefined *)0xfffffffc)) &&
      ((*(uint *)(puVar22 + 8) == uVar2 >> 0xc && (*(int **)(puVar22 + 4) != (int *)0x0)))) &&
     ((cVar6 = (**(code **)(**(int **)(puVar22 + 4) + 0x32c))(), cVar6 != '\0' &&
      (cVar6 = (**(code **)(*(int *)((int)param_2 + 0x4028) + 0x114))(), cVar6 != '\0')))) {
    piVar8 = (int *)(**(code **)(*(int *)param_2 + 0x9bc))();
    cVar6 = (**(code **)(*piVar8 + 0xd0))();
    if (cVar6 != '\0') {
      this_01 = ::operator_new(0x40);
                    /* try { // try from 00a71c9a to 00a71c9e has its CatchHandler @ 00a72169 */
      BoomerSelfDestruct::BoomerSelfDestruct(this_01);
      *(undefined4 *)(param_1 + 0x20) = 0;
      *(undefined4 *)(param_1 + 0x24) = 0;
      *(undefined4 *)(param_1 + 0x28) = 0;
      *(undefined4 *)(param_1 + 0x2c) = 0;
      *(undefined4 *)this = 2;
      *(BoomerSelfDestruct **)(this + 4) = this_01;
      *(undefined4 *)(this + 8) = 0;
      return this;
    }
  }
  cVar6 = Boomer::ShouldBackOff();
  if (cVar6 == '\0') {
    pTVar17 = (TerrorNavArea *)(**(code **)(*(int *)param_2 + 0x52c))();
    cVar6 = CDirectorTacticalServices::IsVisibleToTeam
                      (*(CDirectorTacticalServices **)(TheDirector + 0x628),(CBaseEntity *)param_2,2
                       ,0,0.0,pTVar17);
    if (cVar6 != '\0') goto LAB_00a70fc0;
    if (*(float *)(param_1 + 0x484c) != -1.0) {
      (**(code **)(*(int *)(param_1 + 0x4848) + 4))();
      *(undefined4 *)(param_1 + 0x484c) = 0xbf800000;
    }
    bVar5 = false;
    bVar4 = false;
  }
  else {
LAB_00a70fc0:
    if (*(float *)(param_1 + 0x484c) <= 0.0) {
      lVar24 = (longdouble)IntervalTimer::Now();
      fVar1 = (float)lVar24;
      if (fVar1 != *(float *)(param_1 + 0x484c)) {
        (**(code **)(*(int *)(param_1 + 0x4848) + 4))();
        *(float *)(param_1 + 0x484c) = fVar1;
      }
      if (fVar1 <= 0.0) {
        bVar5 = true;
        bVar4 = false;
        goto LAB_00a71010;
      }
    }
    fVar1 = *(float *)(BoomerExposedTimeTolerance._28_4_ + 0x2c);
    lVar24 = (longdouble)IntervalTimer::Now();
    bVar5 = true;
    bVar4 = fVar1 < (float)lVar24 - *(float *)(param_1 + 0x484c);
  }
LAB_00a71010:
  iVar13 = *(int *)((int)param_2 + 0x4018);
  if ((*(int *)(ZombieAllowAIToUseAbilities._28_4_ + 0x30) != 0) && (iVar13 == 0)) {
    cVar6 = (**(code **)(*piVar10 + 0x32c))();
    if ((cVar6 != '\0') &&
       (cVar6 = (**(code **)(*(int *)((int)param_2 + 0x4028) + 0x114))(), cVar6 != '\0')) {
      piVar8 = (int *)(**(code **)(*(int *)param_2 + 0x9bc))();
      cVar6 = (**(code **)(*piVar8 + 0xd0))();
      if (cVar6 != '\0') {
        pCVar20 = (CTerrorPlayer *)0x0;
        uVar2 = *(uint *)(param_1 + 0x34);
        if (((uVar2 != 0xffffffff) &&
            (puVar22 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar22 != (undefined *)0xfffffffc))
           && (*(uint *)(puVar22 + 8) == uVar2 >> 0xc)) {
          pCVar20 = *(CTerrorPlayer **)(puVar22 + 4);
        }
        this_03 = ::operator_new(0x48);
                    /* try { // try from 00a72015 to 00a72019 has its CatchHandler @ 00a7216b */
        BoomerVomitOnVictim::BoomerVomitOnVictim(this_03,pCVar20);
        *(undefined4 *)(param_1 + 0x20) = 0;
        *(undefined4 *)(param_1 + 0x24) = 0;
        *(undefined4 *)(param_1 + 0x28) = 0;
        *(undefined4 *)(param_1 + 0x2c) = 0;
        *(undefined4 *)this = 2;
        *(BoomerVomitOnVictim **)(this + 4) = this_03;
        *(char **)(this + 8) = "Launching vomit attack!";
        return this;
      }
    }
    iVar13 = *(int *)((int)param_2 + 0x4018);
  }
  if (iVar13 == 1) {
LAB_00a710f3:
    cVar6 = (**(code **)(*(int *)param_2 + 0x998))();
    if (cVar6 == '\0') {
      lVar24 = (longdouble)CTerrorPlayer::GetFlowDistance();
      fVar1 = *(float *)(ZombieAttackFlowRange._28_4_ + 0x2c);
      lVar25 = (longdouble)CTerrorPlayer::GetFlowDistance();
      if ((float)lVar25 < (float)lVar24 - fVar1) goto LAB_00a70e14;
    }
  }
  else {
    cVar6 = (**(code **)(*piVar10 + 0x32c))();
    if (cVar6 == '\0') {
      if (!bVar5) goto LAB_00a70e14;
      if (*(int *)((int)param_2 + 0x4018) != 1) goto LAB_00a71060;
      goto LAB_00a710f3;
    }
    if ((*(int *)((int)param_2 + 0x4018) == 1) || (!bVar5)) goto LAB_00a710f3;
LAB_00a71060:
    pCVar20 = (CTerrorPlayer *)0x0;
    uVar2 = *(uint *)(param_1 + 0x34);
    if ((uVar2 != 0xffffffff) &&
       ((puVar22 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar22 != (undefined *)0xfffffffc &&
        (*(uint *)(puVar22 + 8) == uVar2 >> 0xc)))) {
      pCVar20 = *(CTerrorPlayer **)(puVar22 + 4);
    }
    cVar6 = CTerrorPlayer::IsInCombat(pCVar20,false);
    if (cVar6 != '\0') goto LAB_00a710f3;
    lVar24 = (longdouble)CountdownTimer::Now();
    if (*(float *)(param_1 + 0x4858) <= (float)lVar24) {
      if (((bVar4) &&
          (cVar6 = (**(code **)(*(int *)((int)param_2 + 0x4028) + 0x11c))(), cVar6 != '\0')) &&
         (cVar6 = CDirector::IsFinale(TheDirector), cVar6 == '\0')) {
        local_74 = "I\'m exposed and too far away";
      }
      else {
        cVar6 = (**(code **)(*piVar10 + 0x32c))();
        if ((cVar6 == '\0') &&
           (iVar13 = CDirectorTacticalServices::GetClosestCharacterWhoIsIT
                               (*(CDirectorTacticalServices **)(TheDirector + 0x628),
                                (CBaseCombatCharacter *)param_2), iVar13 == 0)) {
          local_74 = "I\'m exposed and my vomit is recharging";
        }
        else {
          cVar6 = Boomer::ShouldBackOff();
          if (cVar6 == '\0') goto LAB_00a7110f;
          local_74 = "The Director says its relax time";
        }
      }
      lVar24 = (longdouble)(**(code **)(*(int *)((int)param_2 + 0x4028) + 0x124))();
      EscapeScan::EscapeScan((EscapeScan *)&local_34,(BossZombiePlayerBot *)param_2);
      if ((*(byte *)((int)param_2 + 0x14d) & 8) != 0) {
        CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2);
      }
      pCVar18 = (CNavArea *)(**(code **)(*(int *)param_2 + 0x52c))();
      SearchSurroundingAreas<EscapeScan>
                (pCVar18,(Vector *)((int)param_2 + 0x2e0),(EscapeScan *)&local_34,
                 (float)lVar24 * 1.5,0,-1);
      if ((local_30 != (CBaseEntity *)0x0) && (local_2c == (CBaseEntity *)0x0)) {
        this_02 = ::operator_new(0x4818);
                    /* try { // try from 00a71e63 to 00a71e67 has its CatchHandler @ 00a72132 */
        BoomerRetreatToCover::BoomerRetreatToCover(this_02,(TerrorNavArea *)local_30);
        *(undefined4 *)(param_1 + 0x20) = 0;
        *(undefined4 *)(param_1 + 0x24) = 0;
        *(undefined4 *)(param_1 + 0x28) = 0;
        *(undefined4 *)(param_1 + 0x2c) = 0;
        *(BoomerRetreatToCover **)(this + 4) = this_02;
        *(undefined4 *)this = 2;
        *(char **)(this + 8) = local_74;
        return this;
      }
      lVar24 = (longdouble)CountdownTimer::Now();
      if ((float)lVar24 + 1.0 != *(float *)(param_1 + 0x4858)) {
        (**(code **)(*(int *)(param_1 + 0x4850) + 4))();
        *(float *)(param_1 + 0x4858) = (float)lVar24 + 1.0;
      }
      if (*(float *)(param_1 + 0x4854) != 1.0) {
        (**(code **)(*(int *)(param_1 + 0x4850) + 4))();
        *(undefined4 *)(param_1 + 0x4854) = 0x3f800000;
      }
    }
  }
LAB_00a7110f:
  pCVar23 = (CBaseEntity *)((int)param_2 + 0x4028);
  cVar6 = (**(code **)(*(int *)pCVar23 + 0x11c))();
  if (cVar6 != '\0') {
    cVar6 = CDirector::IsFinale(TheDirector);
    if (((cVar6 == '\0') && (*(char *)(*(int *)(TheDirector + 0x638) + 0x111) == '\0')) &&
       (cVar6 = (**(code **)(*(int *)param_2 + 0x998))(), cVar6 == '\0')) {
      pCVar20 = (CTerrorPlayer *)0x0;
      uVar2 = *(uint *)(param_1 + 0x34);
      if (((uVar2 != 0xffffffff) &&
          (puVar22 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar22 != (undefined *)0xfffffffc)) &&
         (*(uint *)(puVar22 + 8) == uVar2 >> 0xc)) {
        pCVar20 = *(CTerrorPlayer **)(puVar22 + 4);
      }
      cVar6 = BossZombiePlayerBot::IsBehind((BossZombiePlayerBot *)param_2,pCVar20);
      if (cVar6 == '\0') {
        iVar13 = (**(code **)(*(int *)param_2 + 0x52c))();
        if (((iVar13 != 0) && (*(int **)(param_1 + 0x4790) != (int *)0x0)) &&
           ((iVar14 = **(int **)(param_1 + 0x4790), iVar13 != iVar14 &&
            ((((iVar14 != 0 && (*(char *)(iVar13 + 0x7e) == '\0')) &&
              (*(char *)(iVar14 + 0x7e) != '\0')) && (!bVar5)))))) goto LAB_00a70e14;
      }
    }
    local_34 = &PTR_operator___00d20e60;
    local_30 = pCVar23;
    local_28 = (**(code **)(*(int *)((int)param_2 + 0x4028) + 0xc0))();
    this_00 = (CBaseEntity *)(**(code **)(*(int *)((int)param_2 + 0x4028) + 0xb4))();
    iVar13 = (**(code **)(*(int *)this_00 + 0x14c))();
    if (iVar13 == 0) {
      local_24 = 0x3f800000;
    }
    else {
      local_24 = *(undefined4 *)(iVar13 + 0x1cec);
    }
    cVar6 = (**(code **)(*(int *)this_00 + 0x16c))();
    local_2c = (CBaseEntity *)0x0;
    if (cVar6 != '\0') {
      local_2c = this_00;
    }
    iVar13 = CBaseEntity::GetTeamNumber(this_00);
    local_20 = 9;
    if (iVar13 == 3) {
      local_20 = (**(code **)(*(int *)this_00 + 0x544))();
    }
    pIVar21 = (IPathCost *)0x0;
    uVar2 = *(uint *)(param_1 + 0x34);
    if (((uVar2 != 0xffffffff) &&
        (puVar22 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar22 != (undefined *)0xfffffffc)) &&
       (*(uint *)(puVar22 + 8) == uVar2 >> 0xc)) {
      pIVar21 = *(IPathCost **)(puVar22 + 4);
    }
    DirectChasePath::Update((INextBot *)(param_1 + 0x38),pCVar23,pIVar21,(Vector *)&local_34);
    if (*(int *)(param_1 + 0x443c) < 1) {
      pCVar23 = (CBaseEntity *)0x0;
      piVar8 = (int *)(**(code **)(*(int *)param_2 + 0x9b0))();
      pcVar3 = *(code **)(*piVar8 + 0xb4);
      uVar2 = *(uint *)(param_1 + 0x34);
      if (((uVar2 != 0xffffffff) &&
          (puVar22 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar22 != (undefined *)0xfffffffc)) &&
         (*(uint *)(puVar22 + 8) == uVar2 >> 0xc)) {
        pCVar23 = *(CBaseEntity **)(puVar22 + 4);
      }
      if (((byte)pCVar23[0x14d] & 8) != 0) {
        CBaseEntity::CalcAbsolutePosition(pCVar23);
      }
      (*pcVar3)();
    }
  }
  cVar6 = (**(code **)(*piVar9 + 0x114))();
  if ((cVar6 == '\0') &&
     (cVar6 = (**(code **)(*(int *)((int)param_2 + 0x4028) + 0x114))(), cVar6 != '\0')) {
    (**(code **)(*(int *)param_2 + 0x940))();
  }
LAB_00a70e14:
  *(undefined4 *)this = 0;
  *(undefined4 *)(this + 4) = 0;
  *(undefined4 *)(this + 8) = 0;
  return this;
}

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)