L L4D2node

CInferno::InfernoThink

0x008c9d70 · 6015 bytes · __thiscall

_ZN8CInferno12InfernoThinkEv

Decompiled

undefined (1 param)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CInferno::InfernoThink() */

void __thiscall CInferno::InfernoThink(CInferno *this)

{
  int *piVar1;
  uint *puVar2;
  CInferno CVar3;
  uint uVar4;
  float *pfVar5;
  CNavArea *pCVar6;
  char cVar7;
  bool bVar8;
  Vector *pVVar9;
  CBaseEntity *pCVar10;
  CFuncElevator *this_00;
  undefined *puVar11;
  Vector *pVVar12;
  int iVar13;
  int iVar14;
  int iVar15;
  longdouble lVar16;
  float fVar17;
  float fVar18;
  float fVar19;
  float fVar20;
  float fVar21;
  float fVar22;
  float fVar23;
  Vector *pVVar24;
  CBaseEdict *pCVar25;
  CBaseEntity *pCVar26;
  int local_8e0;
  int local_8dc;
  int local_8d0;
  int local_8cc;
  CUtlMemory<CNavArea*,int> *local_8c4;
  CBaseEntity *local_8bc;
  uint local_8b8;
  float local_8b4;
  int local_8b0;
  undefined4 local_8a4;
  undefined4 local_8a0;
  CNavArea *local_89c;
  undefined4 local_898;
  undefined4 local_894;
  undefined4 local_890;
  Vector *local_88c;
  CNavArea *local_888;
  undefined4 local_884;
  Vector *local_880;
  undefined4 local_87c [15];
  float local_840;
  CBaseEntity *local_81c;
  int *local_818;
  undefined4 local_814;
  undefined4 local_810;
  int local_80c;
  int *local_808;
  CBaseEntity *local_41c;
  float local_418;
  Vector *local_414;
  float local_410;
  float local_40c;
  float local_408;
  
  local_8a4 = 0;
  local_8a0 = 0;
  if (_towlower == (Vector *)0x0) {
    local_88c = (Vector *)0x0;
  }
  else {
    (**(code **)(_towlower + 0x50))
              (_towlower,&local_8a4,0,0,0,0,"/data/src/game/server/terror/effects/inferno.cpp",0x228
               ,&InfernoThink()::tm_fmt,"(%s)%s","Fire","CInferno::InfernoThink");
    local_88c = _towlower;
  }
  iVar15 = _DAT_0105db00;
  local_894 = local_8a4;
  local_890 = local_8a0;
                    /* try { // try from 008ca1de to 008ca23e has its CatchHandler @ 008cb612 */
  if (((_DAT_0105d154 == 0) && (DAT_0105d158 != '\0')) ||
     (iVar13 = ThreadGetCurrentId(), iVar15 != iVar13)) {
    CVar3 = this[0x14d];
  }
  else {
    if (*(char **)_DAT_0105d15c != "CInferno::InfernoThink") {
      _DAT_0105d15c =
           (Vector *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xce7a12,(char *)0x0,0xc40743);
    }
    puVar2 = (uint *)(_DAT_0105d1e8 + 4 + *(int *)(_DAT_0105d15c + 0x70) * 8);
    *puVar2 = *puVar2 | 4;
    CVProfNode::EnterScope();
    DAT_0105d158 = '\0';
    CVar3 = this[0x14d];
  }
  if (((byte)CVar3 & 8) != 0) {
                    /* try { // try from 008ca25c to 008ca260 has its CatchHandler @ 008cb5e4 */
    CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
  }
  local_8bc = (CBaseEntity *)0x0;
  fVar23 = *(float *)(this + 0x2e0);
  fVar22 = *(float *)(this + 0x2e4);
  fVar20 = *(float *)(this + 0x2e8);
  uVar4 = *(uint *)(this + 0x180);
  if (((uVar4 != 0xffffffff) &&
      (puVar11 = g_pEntityList + (uVar4 & 0xfff) * 0x10, puVar11 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar11 + 8) == uVar4 >> 0xc)) {
    local_8bc = *(CBaseEntity **)(puVar11 + 4);
  }
  local_81c = (CBaseEntity *)0x0;
  local_818 = (int *)0x0;
  if (_towlower == (Vector *)0x0) {
    local_414 = (Vector *)0x0;
  }
  else {
                    /* try { // try from 008c9f37 to 008c9f39 has its CatchHandler @ 008cb5e4 */
    (**(code **)(_towlower + 0x50))
              (_towlower,&local_81c,0,0,0,0,"/data/src/game/server/terror/effects/inferno.cpp",0x22e
               ,&InfernoThink()::tm_fmt,"(%s)%s","Fire","CInferno::InfernoThink (check lifetimes)");
    local_414 = _towlower;
  }
  iVar15 = _DAT_0105db00;
  local_41c = local_81c;
  local_418 = (float)local_818;
                    /* try { // try from 008ca166 to 008ca1c6 has its CatchHandler @ 008cb5c2 */
  if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
     (iVar13 = ThreadGetCurrentId(), iVar15 == iVar13)) {
    if (*(char **)_DAT_0105d15c != "CInferno::InfernoThink (check lifetimes)") {
      _DAT_0105d15c =
           (Vector *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xce7c3c,(char *)0x0,0xc40743);
    }
    puVar2 = (uint *)(_DAT_0105d1e8 + 4 + *(int *)(_DAT_0105d15c + 0x70) * 8);
    *puVar2 = *puVar2 | 4;
    CVProfNode::EnterScope();
    DAT_0105d158 = '\0';
  }
  if (*(int *)(this + 0xa40) < 1) {
LAB_008caa90:
                    /* try { // try from 008caa96 to 008caa9a has its CatchHandler @ 008cb5d4 */
    UTIL_Remove((CBaseEntity *)this);
    iVar15 = _DAT_0105db00;
    if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
       (iVar13 = ThreadGetCurrentId(), iVar15 == iVar13)) {
      this = (CInferno *)_DAT_0105d15c;
      cVar7 = CVProfNode::ExitScope();
      if (cVar7 != '\0') {
        _DAT_0105d15c = *(Vector **)(_DAT_0105d15c + 100);
      }
      DAT_0105d158 = _DAT_0105d15c == (Vector *)0x105d160;
    }
    if (local_414 != (Vector *)0x0) {
      this = (CInferno *)local_414;
      (**(code **)(local_414 + 0x54))(local_414,local_41c,local_418,0,0,0);
    }
    iVar15 = _DAT_0105db00;
    if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
       (iVar13 = ThreadGetCurrentId(this), iVar15 == iVar13)) {
      cVar7 = CVProfNode::ExitScope();
      if (cVar7 != '\0') {
        _DAT_0105d15c = *(Vector **)(_DAT_0105d15c + 100);
      }
      DAT_0105d158 = _DAT_0105d15c == (Vector *)0x105d160;
    }
    if (local_88c != (Vector *)0x0) {
      (**(code **)(local_88c + 0x54))(local_88c,local_894,local_890,0,0,0);
    }
    return;
  }
  iVar15 = 0;
  bVar8 = true;
  pVVar9 = (Vector *)(this + 0x640);
  pVVar12 = pVVar9;
  do {
    iVar13 = *(int *)(pVVar12 + 0x408);
    pVVar24 = (Vector *)(iVar13 + 0x48);
                    /* try { // try from 008ca099 to 008ca09d has its CatchHandler @ 008cb5d4 */
    lVar16 = (longdouble)CountdownTimer::Now();
    pfVar5 = *(float **)(pVVar12 + 0x408);
    if (*(float *)(iVar13 + 0x50) <= (float)lVar16) {
      if (((*pfVar5 != 0.0) || (pfVar5[1] != 0.0)) || (pfVar5[2] != 0.0)) {
        *pfVar5 = 0.0;
        pfVar5[1] = 0.0;
        pfVar5[2] = 0.0;
        local_87c[0] = 0;
        iVar13 = memcmp(pVVar12 + -0x200,local_87c,4);
        if (iVar13 != 0) {
          if (this[0x6c] == (CInferno)0x0) {
            pCVar25 = *(CBaseEdict **)(this + 0x30);
            if (pCVar25 != (CBaseEdict *)0x0) {
              *(uint *)pCVar25 = *(uint *)pCVar25 | 0x101;
              iVar13 = CBaseEdict::GetChangeAccessor(pCVar25);
              *(undefined2 *)(iVar13 + 2) = 0;
            }
          }
          else {
            this[0x70] = (CInferno)((byte)this[0x70] | 1);
          }
          *(undefined4 *)(this + iVar15 * 4 + 0x440) = 0;
        }
        local_87c[0] = 0;
        iVar13 = memcmp(pVVar12 + -0x100,local_87c,4);
        if (iVar13 != 0) {
          if (this[0x6c] == (CInferno)0x0) {
            pCVar25 = *(CBaseEdict **)(this + 0x30);
            if (pCVar25 != (CBaseEdict *)0x0) {
              *(uint *)pCVar25 = *(uint *)pCVar25 | 0x101;
              iVar13 = CBaseEdict::GetChangeAccessor(pCVar25);
              *(undefined2 *)(iVar13 + 2) = 0;
            }
          }
          else {
            this[0x70] = (CInferno)((byte)this[0x70] | 1);
          }
          *(undefined4 *)(this + iVar15 * 4 + 0x540) = 0;
        }
        local_87c[0] = 0;
        pVVar24 = pVVar12;
        iVar13 = memcmp(pVVar12,local_87c,4);
        if (iVar13 != 0) {
          if (this[0x6c] == (CInferno)0x0) {
            pCVar25 = *(CBaseEdict **)(this + 0x30);
            if (pCVar25 != (CBaseEdict *)0x0) {
              *(uint *)pCVar25 = *(uint *)pCVar25 | 0x101;
              iVar13 = CBaseEdict::GetChangeAccessor(pCVar25);
              *(undefined2 *)(iVar13 + 2) = 0;
              pVVar24 = (Vector *)pCVar25;
            }
          }
          else {
            this[0x70] = (CInferno)((byte)this[0x70] | 1);
          }
          *(undefined4 *)(pVVar9 + iVar15 * 4) = 0;
        }
      }
    }
    else {
      *pfVar5 = fVar23;
      pfVar5[1] = fVar22;
      pfVar5[2] = fVar20;
      **(float **)(pVVar12 + 0x408) =
           (float)*(int *)(this + iVar15 * 4 + 0x440) + **(float **)(pVVar12 + 0x408);
      *(float *)(*(int *)(pVVar12 + 0x408) + 4) =
           (float)*(int *)(this + iVar15 * 4 + 0x540) + *(float *)(*(int *)(pVVar12 + 0x408) + 4);
      *(float *)(*(int *)(pVVar12 + 0x408) + 8) =
           (float)*(int *)(pVVar9 + iVar15 * 4) + *(float *)(*(int *)(pVVar12 + 0x408) + 8);
      if (local_8bc != (CBaseEntity *)0x0) {
        pVVar24 = (Vector *)this;
        RecomputeExtent(this);
      }
      if (*(int *)(InfernoDebug._28_4_ + 0x30) != 0) {
        pVVar24 = *(Vector **)(pVVar12 + 0x408);
                    /* try { // try from 008ca2b6 to 008ca360 has its CatchHandler @ 008cb5d4 */
        NDebugOverlay::Sphere
                  (pVVar24,*(float *)(this + 0xb48) + *(float *)(this + 0xb48),0xff,100,0,true,0.1);
      }
      bVar8 = false;
    }
    iVar13 = _DAT_0105db00;
    iVar15 = iVar15 + 1;
    pVVar12 = pVVar12 + 4;
  } while (iVar15 < *(int *)(this + 0xa40));
  if (bVar8) goto LAB_008caa90;
  if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
     (iVar15 = ThreadGetCurrentId(pVVar24), iVar13 == iVar15)) {
    pVVar24 = _DAT_0105d15c;
    cVar7 = CVProfNode::ExitScope();
    if (cVar7 != '\0') {
      _DAT_0105d15c = *(Vector **)(_DAT_0105d15c + 100);
    }
    DAT_0105d158 = _DAT_0105d15c == (Vector *)0x105d160;
  }
  if (local_414 != (Vector *)0x0) {
    pVVar24 = local_414;
    (**(code **)(local_414 + 0x54))(local_414,local_41c,local_418,0,0,0);
  }
  iVar15 = 0x40;
  if (*(int *)(this + 0xba4) < 0x41) {
    iVar15 = *(int *)(this + 0xba4);
  }
  if (*(int *)(this + 0xa40) < iVar15) {
    local_81c = (CBaseEntity *)0x0;
    local_818 = (int *)0x0;
    if (_towlower == (Vector *)0x0) {
      local_414 = (Vector *)0x0;
    }
    else {
                    /* try { // try from 008ca4b4 to 008ca4b6 has its CatchHandler @ 008cb5e4 */
      pVVar24 = _towlower;
      (**(code **)(_towlower + 0x50))
                (_towlower,&local_81c,0,0,0,0,"/data/src/game/server/terror/effects/inferno.cpp",
                 0x260,&InfernoThink()::tm_fmt,"(%s)%s","Fire","CInferno::InfernoThink (spread)");
      local_414 = _towlower;
    }
    iVar15 = _DAT_0105db00;
    local_41c = local_81c;
    local_418 = (float)local_818;
                    /* try { // try from 008cacc7 to 008cad27 has its CatchHandler @ 008cb609 */
    if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
       (iVar13 = ThreadGetCurrentId(pVVar24), iVar15 == iVar13)) {
      if (*(char **)_DAT_0105d15c != "CInferno::InfernoThink (spread)") {
        _DAT_0105d15c =
             (Vector *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xce7c68,(char *)0x0,0xc40743);
      }
      puVar2 = (uint *)(_DAT_0105d1e8 + 4 + *(int *)(_DAT_0105d15c + 0x70) * 8);
      *puVar2 = *puVar2 | 4;
      pVVar24 = _DAT_0105d15c;
      CVProfNode::EnterScope();
      DAT_0105d158 = '\0';
    }
    if (0 < *(int *)(this + 0xa40)) {
      pVVar24 = (Vector *)this;
                    /* try { // try from 008ca514 to 008ca518 has its CatchHandler @ 008cb619 */
      Spread(this,(Vector *)(this + 0xb80));
    }
    iVar15 = _DAT_0105db00;
    if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
       (iVar13 = ThreadGetCurrentId(pVVar24), iVar15 == iVar13)) {
      cVar7 = CVProfNode::ExitScope();
      if (cVar7 != '\0') {
        _DAT_0105d15c = *(Vector **)(_DAT_0105d15c + 100);
      }
      DAT_0105d158 = _DAT_0105d15c == (Vector *)0x105d160;
    }
    if (local_414 != (Vector *)0x0) {
      (**(code **)(local_414 + 0x54))(local_414,local_41c,local_418,0,0,0);
    }
  }
  fVar23 = *(float *)(this + 0xb48);
  pVVar12 = (Vector *)(this + 0xb68);
  pVVar9 = pVVar12;
                    /* try { // try from 008ca58b to 008ca62e has its CatchHandler @ 008cb5e4 */
  lVar16 = (longdouble)CountdownTimer::Now();
  if ((float)lVar16 < *(float *)(this + 0xb70)) goto LAB_008cad96;
  local_89c = (CNavArea *)0x0;
  local_898 = 0;
  if (_towlower == (Vector *)0x0) {
    local_880 = (Vector *)0x0;
  }
  else {
    pVVar9 = _towlower;
    (**(code **)(_towlower + 0x50))
              (_towlower,&local_89c,0,0,0,0,"/data/src/game/server/terror/effects/inferno.cpp",0x26e
               ,&InfernoThink()::tm_fmt,"(%s)%s","Fire","CInferno::InfernoThink (damage)");
    local_880 = _towlower;
  }
  iVar15 = _DAT_0105db00;
  local_888 = local_89c;
  local_884 = local_898;
                    /* try { // try from 008cac12 to 008cac72 has its CatchHandler @ 008cb60b */
  if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
     (iVar13 = ThreadGetCurrentId(pVVar9), iVar15 == iVar13)) {
    if (*(char **)_DAT_0105d15c != "CInferno::InfernoThink (damage)") {
      _DAT_0105d15c =
           (Vector *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xce7c88,(char *)0x0,0xc40743);
    }
    puVar2 = (uint *)(_DAT_0105d1e8 + 4 + *(int *)(_DAT_0105d15c + 0x70) * 8);
    *puVar2 = *puVar2 | 4;
    CVProfNode::EnterScope();
    DAT_0105d158 = '\0';
  }
                    /* try { // try from 008ca670 to 008caa82 has its CatchHandler @ 008cb5e8 */
  lVar16 = (longdouble)CountdownTimer::Now();
  if ((float)lVar16 + 0.2 != *(float *)(this + 0xb70)) {
    (**(code **)(*(int *)(this + 0xb68) + 4))(pVVar12,this + 0xb70);
    *(float *)(this + 0xb70) = (float)lVar16 + 0.2;
  }
  if (*(float *)(this + 0xb6c) != 0.2) {
                    /* try { // try from 008cb37a to 008cb3ff has its CatchHandler @ 008cb5e8 */
    (**(code **)(*(int *)(this + 0xb68) + 4))(pVVar12,this + 0xb6c);
    *(undefined4 *)(this + 0xb6c) = 0x3e4ccccd;
  }
  local_8bc = (CBaseEntity *)0x0;
  uVar4 = *(uint *)(this + 0x220);
  if (((uVar4 != 0xffffffff) &&
      (puVar11 = g_pEntityList + (uVar4 & 0xfff) * 0x10, puVar11 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar11 + 8) == uVar4 >> 0xc)) {
    local_8bc = *(CBaseEntity **)(puVar11 + 4);
  }
  CFlaggedEntitiesEnum::CFlaggedEntitiesEnum((CFlaggedEntitiesEnum *)local_87c,&local_41c,0x100,0);
  iVar15 = UTIL_EntitiesInBox((Vector *)(this + 0xb50),(Vector *)(this + 0xb5c),
                              (CFlaggedEntitiesEnum *)local_87c);
  if (iVar15 < 1) {
    local_8b0 = 0;
  }
  else {
    iVar13 = 0;
    local_8b0 = 0;
    do {
      pCVar26 = (&local_41c)[iVar13];
      if (((pCVar26 != (CBaseEntity *)0x0) &&
          (cVar7 = (**(code **)(*(int *)pCVar26 + 300))(pCVar26), cVar7 != '\0')) &&
         (pCVar26 = (&local_41c)[iVar13], this != (CInferno *)pCVar26)) {
        bVar8 = (bool)(**(code **)(*(int *)pCVar26 + 0x16c))(pCVar26);
        cVar7 = IsTouching(this,(&local_41c)[iVar13],fVar23 + fVar23,bVar8);
        if (cVar7 != '\0') {
          (&local_81c)[local_8b0] = (&local_41c)[iVar13];
          local_8b0 = local_8b0 + 1;
        }
      }
      iVar13 = iVar13 + 1;
    } while (iVar13 != iVar15);
  }
  local_8b8 = (**(code **)(*(int *)this + 0x324))(this);
  if (*(float *)(this + 0xb9c) <= 0.0) {
    if (99999.9 < *(float *)(InfernoFriendlyFireDuration._28_4_ + 0x2c) ||
        *(float *)(InfernoFriendlyFireDuration._28_4_ + 0x2c) == 99999.9) goto LAB_008ca84e;
LAB_008cb283:
    local_8b8 = local_8b8 | 0x800;
  }
  else {
    lVar16 = (longdouble)IntervalTimer::Now();
    if (*(float *)(InfernoFriendlyFireDuration._28_4_ + 0x2c) <=
        (float)lVar16 - *(float *)(this + 0xb9c) &&
        (float)lVar16 - *(float *)(this + 0xb9c) !=
        *(float *)(InfernoFriendlyFireDuration._28_4_ + 0x2c)) goto LAB_008cb283;
LAB_008ca84e:
    if (local_8bc == (CBaseEntity *)0x0) goto LAB_008cb283;
  }
  lVar16 = (longdouble)(**(code **)(*(int *)this + 0x32c))(this);
  if (*(float *)(this + 0xb70) <= 0.0) {
    local_8b4 = 0.0;
  }
  else {
    local_8b4 = (float)lVar16 * *(float *)(this + 0xb6c);
  }
  pCVar26 = (CBaseEntity *)(this + 0xb74);
  pCVar10 = pCVar26;
  lVar16 = (longdouble)CountdownTimer::Now();
  if ((float)lVar16 < *(float *)(this + 0xb7c)) {
    lVar16 = (longdouble)CountdownTimer::Now();
    local_8b4 = (((*(float *)(this + 0xb78) - *(float *)(this + 0xb7c)) + (float)lVar16) /
                (float)(-(uint)(0.0 < *(float *)(this + 0xb7c)) & (uint)*(float *)(this + 0xb78))) *
                local_8b4;
    pCVar10 = pCVar26;
  }
  if (local_8b0 != 0) {
    iVar15 = 0;
    do {
      pCVar26 = (&local_81c)[iVar15];
      pCVar10 = (CBaseEntity *)this;
      cVar7 = (**(code **)(*(int *)this + 0x33c))(this,pCVar26);
      if (cVar7 != '\0') {
        iVar13 = (**(code **)(*(int *)this + 0x328))(this);
        CTakeDamageInfo::CTakeDamageInfo
                  ((CTakeDamageInfo *)local_87c,(CBaseEntity *)this,local_8bc,local_8b4,local_8b8,
                   iVar13);
        if (*(int *)(this + 0xa44) != 1) {
          if ((pCVar26 != (CBaseEntity *)0x0) &&
             (cVar7 = (**(code **)(*(int *)pCVar26 + 0x16c))(pCVar26), cVar7 != '\0')) {
            iVar13 = CBaseEntity::GetTeamNumber(pCVar26);
            cVar7 = IsASurvivorTeam(iVar13);
            if (cVar7 != '\0') {
              lVar16 = (longdouble)
                       CTerrorPlayer::GetFriendlyFireScale
                                 ((CTerrorPlayer *)pCVar26,(CTakeDamageInfo *)local_87c);
              local_840 = (float)lVar16 * local_8b4;
              goto LAB_008ca9f6;
            }
          }
                    /* try { // try from 008cb2b5 to 008cb2ba has its CatchHandler @ 008cb5e8 */
          iVar13 = (**(code **)(*(int *)pCVar26 + 0x14c))(pCVar26);
          if (iVar13 != 0) {
            local_840 = local_8b4 * 0.2;
          }
        }
LAB_008ca9f6:
        pCVar10 = pCVar26;
        CBaseEntity::TakeDamage(pCVar26,(CTakeDamageInfo *)local_87c);
        if ((*(int *)(this + 0xa44) == 1) &&
           (pCVar10 = pCVar26, cVar7 = (**(code **)(*(int *)pCVar26 + 0x16c))(pCVar26),
           cVar7 != '\0')) {
          pCVar10 = (CBaseEntity *)CBaseEntity::GetTeamNumber(pCVar26);
          cVar7 = IsASurvivorTeam((int)pCVar10);
          if ((cVar7 != '\0') &&
             (((this_00 = (CFuncElevator *)CBaseEntity::GetGroundEntity(pCVar26), pCVar10 = pCVar26,
               this_00 != (CFuncElevator *)0x0 &&
               (pCVar10 = (CBaseEntity *)this_00,
               cVar7 = (**(code **)(*(int *)this_00 + 0x180))(this_00), cVar7 != '\0')) &&
              (cVar7 = CFuncElevator::IsMoving(this_00), pCVar10 = (CBaseEntity *)this_00,
              cVar7 != '\0')))) {
            pCVar10 = (CBaseEntity *)this;
            UTIL_Remove((CBaseEntity *)this);
          }
        }
      }
      iVar15 = iVar15 + 1;
    } while (iVar15 != local_8b0);
  }
  iVar15 = _DAT_0105db00;
  if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
     (iVar13 = ThreadGetCurrentId(pCVar10), iVar15 == iVar13)) {
    cVar7 = CVProfNode::ExitScope();
    if (cVar7 != '\0') {
      _DAT_0105d15c = *(Vector **)(_DAT_0105d15c + 100);
    }
    DAT_0105d158 = _DAT_0105d15c == (Vector *)0x105d160;
  }
  if (local_880 != (Vector *)0x0) {
    (**(code **)(local_880 + 0x54))(local_880,local_888,local_884,0,0,0);
  }
LAB_008cad96:
  iVar15 = TheNavMesh;
  local_818 = (int *)0x0;
  local_814 = 0;
  local_810 = 0;
  local_80c = 0;
  local_81c = (CBaseEntity *)((uint)local_81c & 0xffffff00);
  fVar23 = *(float *)(this + 0xb58);
  local_8bc = (CBaseEntity *)0x42800000;
  local_808 = (int *)0x0;
  fVar18 = *(float *)(this + 0xb50);
  fVar22 = *(float *)(this + 0xb60);
  fVar20 = *(float *)(this + 0xb64);
  fVar19 = *(float *)(this + 0xb54);
  fVar21 = *(float *)(this + 0xb5c);
  if (*(int *)(this + 0xa44) != 1) {
    local_8bc = (CBaseEntity *)0x42000000;
  }
  if (*(int *)(TheNavMesh + 0x18) != 0) {
    if ((CNavMesh::ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)::
         searchMarker == '\0') &&
       (iVar13 = __cxa_guard_acquire(&CNavMesh::
                                      ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)
                                      ::searchMarker), iVar13 != 0)) {
                    /* try { // try from 008cb46f to 008cb473 has its CatchHandler @ 008cb5a6 */
      CNavMesh::ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)::
      searchMarker = RandomInt(0,0x100000);
      __cxa_guard_release(&CNavMesh::
                           ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)
                           ::searchMarker);
    }
    iVar13 = CNavMesh::
             ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)::
             searchMarker + 1;
    if (CNavMesh::ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)::
        searchMarker + 1 == 0) {
      iVar13 = CNavMesh::
               ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)::
               searchMarker + 2;
    }
    CNavMesh::ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)::
    searchMarker = iVar13;
    fVar18 = fVar18 - (float)local_8bc;
    fVar17 = 1.0 / *(float *)(iVar15 + 0x20);
    iVar13 = (int)((fVar18 - *(float *)(iVar15 + 0x2c)) * fVar17);
    if (iVar13 < 0) {
      local_8cc = 0;
    }
    else {
      local_8cc = *(int *)(iVar15 + 0x24) + -1;
      if (iVar13 < *(int *)(iVar15 + 0x24)) {
        local_8cc = iVar13;
      }
    }
    fVar21 = fVar21 + (float)local_8bc;
    iVar13 = (int)((fVar21 - *(float *)(iVar15 + 0x2c)) * fVar17);
    if (iVar13 < 0) {
      local_8dc = 0;
    }
    else {
      local_8dc = *(int *)(iVar15 + 0x24) + -1;
      if (iVar13 < *(int *)(iVar15 + 0x24)) {
        local_8dc = iVar13;
      }
    }
    fVar19 = fVar19 - (float)local_8bc;
    iVar13 = (int)((fVar19 - *(float *)(iVar15 + 0x30)) * fVar17);
    if (iVar13 < 0) {
      local_8e0 = 0;
    }
    else {
      local_8e0 = *(int *)(iVar15 + 0x28) + -1;
      if (iVar13 < *(int *)(iVar15 + 0x28)) {
        local_8e0 = iVar13;
      }
    }
    fVar22 = fVar22 + (float)local_8bc;
    iVar13 = (int)((fVar22 - *(float *)(iVar15 + 0x30)) * fVar17);
    if (iVar13 < 0) {
      local_8d0 = 0;
    }
    else {
      local_8d0 = *(int *)(iVar15 + 0x28) + -1;
      if (iVar13 < *(int *)(iVar15 + 0x28)) {
        local_8d0 = iVar13;
      }
    }
    if (local_8cc <= local_8dc) {
      fVar23 = fVar23 - (float)local_8bc;
      fVar20 = (float)local_8bc + fVar20;
      do {
        if (local_8e0 <= local_8d0) {
          iVar13 = local_8e0 * *(int *)(iVar15 + 0x24) + local_8cc;
          if (iVar13 < *(int *)(iVar15 + 0x18)) {
            local_8bc = (CBaseEntity *)local_8e0;
            do {
              iVar14 = 0;
              piVar1 = (int *)(*(int *)(iVar15 + 0xc) + iVar13 * 0x14);
              if (0 < piVar1[3]) {
                do {
                  pCVar6 = *(CNavArea **)(*piVar1 + iVar14 * 4);
                  if (*(int *)(pCVar6 + 0x74) !=
                      CNavMesh::
                      ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)
                      ::searchMarker) {
                    *(int *)(pCVar6 + 0x74) =
                         CNavMesh::
                         ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)
                         ::searchMarker;
                    /* try { // try from 008cb063 to 008cb1b6 has its CatchHandler @ 008cb556 */
                    CNavArea::GetExtent(pCVar6,(Extent *)&local_41c);
                    if (((((fVar18 <= local_410) && ((float)local_41c <= fVar21)) &&
                         (fVar19 <= local_40c)) && ((local_418 <= fVar22 && (fVar23 <= local_408))))
                       && ((float)local_414 <= fVar20)) {
                      local_888 = pCVar6;
                      if (((char)local_81c == '\0') || (local_80c < 1)) {
LAB_008cb314:
                    /* try { // try from 008cb32b to 008cb32f has its CatchHandler @ 008cb556 */
                        CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>>::InsertBefore
                                  ((CUtlVector<CNavArea*,CUtlMemory<CNavArea*,int>> *)&local_818,
                                   local_80c,&local_888);
                      }
                      else if (pCVar6 != (CNavArea *)*local_818) {
                        iVar13 = 0;
                        do {
                          iVar13 = iVar13 + 1;
                          if (iVar13 == local_80c) goto LAB_008cb314;
                        } while (pCVar6 != (CNavArea *)local_818[iVar13]);
                        if (iVar13 < 0) goto LAB_008cb314;
                      }
                    }
                  }
                  iVar14 = iVar14 + 1;
                } while (iVar14 < piVar1[3]);
              }
              local_8bc = (CBaseEntity *)((int)local_8bc + 1);
              if (local_8d0 < (int)local_8bc) goto LAB_008cb4f5;
              iVar13 = (int)local_8bc * *(int *)(iVar15 + 0x24) + local_8cc;
              if (*(int *)(iVar15 + 0x18) <= iVar13) break;
            } while( true );
          }
          if (CNavMesh::
              ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)::
              __executeCount < 10) {
            CNavMesh::
            ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)::
            __executeCount =
                 CNavMesh::
                 ForAllAreasOverlappingExtent<NavAreaCollector>(NavAreaCollector&,Extent_const&)::
                 __executeCount + 1;
                    /* try { // try from 008cb53d to 008cb541 has its CatchHandler @ 008cb556 */
            Warning("** Walked off of the CNavMesh::m_grid in ForAllAreasOverlappingExtent()\n");
          }
          break;
        }
LAB_008cb4f5:
        local_8cc = local_8cc + 1;
      } while (local_8cc <= local_8dc);
    }
    if (0 < local_80c) {
      iVar15 = 0;
      do {
        pCVar6 = (CNavArea *)local_818[iVar15];
        cVar7 = IsTouching(this,pCVar6);
        if (cVar7 != '\0') {
          *(int *)(pCVar6 + 0x70) =
               (int)(1.0 / *(float *)(gpGlobals + 0x1c) + 0.5) + *(int *)(gpGlobals + 0x18);
        }
        iVar15 = iVar15 + 1;
      } while (iVar15 < local_80c);
    }
  }
  local_8c4 = (CUtlMemory<CNavArea*,int> *)&local_818;
  CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc) + 0.1,(char *)0x0);
  local_80c = 0;
  CUtlMemory<CNavArea*,int>::Purge(local_8c4);
  local_808 = local_818;
  CUtlMemory<CNavArea*,int>::Purge(local_8c4);
  iVar15 = _DAT_0105db00;
  if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
     (iVar13 = ThreadGetCurrentId(), iVar15 == iVar13)) {
    cVar7 = CVProfNode::ExitScope();
    if (cVar7 != '\0') {
      _DAT_0105d15c = *(Vector **)(_DAT_0105d15c + 100);
    }
    DAT_0105d158 = _DAT_0105d15c == (Vector *)0x105d160;
  }
  if (local_88c == (Vector *)0x0) {
    return;
  }
  (**(code **)(local_88c + 0x54))(local_88c,local_894,local_890,0,0,0);
  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)