L L4D2node

CTankClaw::GroundPound

0x00560990 · 3048 bytes · __thiscall

_ZN9CTankClaw11GroundPoundEv

Decompiled

undefined (1 param)

/* CTankClaw::GroundPound() */

void __thiscall CTankClaw::GroundPound(CTankClaw *this)

{
  int *piVar1;
  uint uVar2;
  int *piVar3;
  code *pcVar4;
  uint uVar5;
  char cVar6;
  char cVar7;
  CBaseEntity *this_00;
  QAngle *pQVar8;
  int iVar9;
  float *pfVar10;
  uint *puVar11;
  int iVar12;
  undefined *puVar13;
  int iVar14;
  int iVar15;
  int *piVar16;
  int *piVar17;
  float fVar18;
  float fVar19;
  undefined **ppuVar20;
  int local_238 [2];
  int local_224;
  int local_220;
  float local_21c [9];
  byte local_1f5;
  int *local_1ec;
  int *local_1d8;
  undefined4 local_1cc;
  undefined4 local_1c8;
  undefined4 local_1c4;
  float local_1c0;
  float local_1bc;
  float local_1b8;
  undefined4 local_1b4;
  undefined4 local_1b0;
  undefined4 local_1ac;
  undefined **local_1a8;
  float local_1a4;
  float local_1a0;
  undefined **local_19c;
  CBaseEntity *local_198;
  undefined4 local_194;
  undefined4 local_190;
  undefined4 local_18c;
  undefined4 local_188;
  undefined4 local_184;
  int local_180 [5];
  float local_16c;
  float local_168;
  undefined4 local_164;
  float local_15c;
  float local_158;
  float local_154;
  undefined4 local_14c;
  undefined4 local_148;
  undefined4 local_144;
  undefined4 local_13c;
  undefined4 local_138;
  undefined4 local_134;
  undefined4 local_12c;
  undefined1 local_128;
  undefined1 local_127;
  undefined **local_11c;
  float local_118;
  float local_114;
  undefined **local_10c;
  float local_108;
  float local_104;
  undefined4 local_fc;
  undefined4 local_f8;
  undefined4 local_f4;
  undefined4 local_ec;
  undefined4 local_e8;
  undefined4 local_e4;
  undefined4 local_dc;
  undefined1 local_d8;
  undefined1 local_d7;
  undefined **local_cc;
  float local_c8;
  float local_c4;
  undefined **local_bc;
  float local_b8;
  float local_b4;
  undefined4 local_ac;
  undefined4 local_a8;
  undefined4 local_a4;
  undefined4 local_9c;
  undefined4 local_98;
  undefined4 local_94;
  undefined4 local_8c;
  undefined1 local_88;
  undefined1 local_87;
  float local_70;
  float local_6c;
  undefined4 local_68;
  undefined1 local_64 [32];
  float local_44;
  int *local_24;
  
  this_00 = (CBaseEntity *)CTerrorWeapon::GetPlayerOwner((CTerrorWeapon *)this);
  if (this_00 != (CBaseEntity *)0x0) {
    if (((byte)this_00[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition(this_00);
    }
    UTIL_ScreenShake();
    if (((byte)this_00[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition(this_00);
    }
    local_1cc = *(undefined4 *)(this_00 + 0x2e0);
    local_1c8 = *(undefined4 *)(this_00 + 0x2e4);
    local_1c4 = *(undefined4 *)(this_00 + 0x2e8);
    ForEachSurvivor<GroundPoundReveal>((GroundPoundReveal *)&local_1cc);
    pQVar8 = (QAngle *)(**(code **)(*(int *)this_00 + 0x238))();
    AngleVectors(pQVar8,(Vector *)&local_1c0);
    local_1b8 = 0.0;
    fVar18 = local_1c0 * 26.625;
    fVar19 = local_1bc * 26.625;
    (**(code **)(*(int *)this_00 + 0x234))();
    piVar17 = (int *)&stack0xfffffdd0;
    local_1b4 = 0x42b40000;
    local_1b0 = 0;
    local_1ac = 0;
    AngleVectors((QAngle *)&local_1b4,(Vector *)&local_1c0);
    local_12c = 0;
    local_128 = 0;
    local_15c = local_1c0 * 71.0;
    local_134 = 0;
    local_158 = local_1bc * 71.0;
    local_13c = 0x420e0000;
    local_154 = local_1b8 * 71.0;
    local_138 = 0x420e0000;
    local_14c = 0;
    local_148 = 0;
    local_144 = 0;
    local_164 = local_68;
    local_19c = &PTR_EnumElement_00c50470;
    local_180[0] = 0;
    local_180[1] = 0;
    local_180[2] = 0;
    local_127 = local_158 * local_158 + local_15c * local_15c + local_154 * local_154 != 0.0;
    local_180[3] = 0;
    local_18c = local_1b4;
    local_180[4] = 0;
    local_194 = 0;
    local_190 = 0xbf800000;
    local_188 = local_1b0;
    local_184 = local_1ac;
                    /* try { // try from 00560cdb to 00560fda has its CatchHandler @ 005615ea */
    local_198 = this_00;
    local_16c = fVar18 + local_70;
    local_168 = fVar19 + local_6c;
    (**(code **)(*partition + 0x40))();
    cVar6 = CTerrorGameRules::HasPlayerControlledZombies();
    if (*(int *)(this + 0x180c) < 1) {
      local_1f5 = 0;
    }
    else {
      iVar14 = 0;
      local_1f5 = 0;
      piVar16 = (int *)&stack0xfffffdd0;
      do {
        while ((((uVar2 = *(uint *)(*(int *)(this + 0x1800) + iVar14 * 4), uVar2 == 0xffffffff ||
                 (puVar13 = g_pEntityList + (uVar2 & 0xfff) * 0x10,
                 puVar13 == (undefined *)0xfffffffc)) || (*(uint *)(puVar13 + 8) != uVar2 >> 0xc))
               || (piVar3 = *(int **)(puVar13 + 4), piVar3 == (int *)0x0))) {
LAB_00560d08:
          iVar14 = iVar14 + 1;
          piVar17 = piVar16;
          if (*(int *)(this + 0x180c) <= iVar14) goto LAB_00561000;
        }
        *piVar16 = (int)piVar3;
        piVar16[-1] = 0x560d56;
        iVar9 = CBaseEntity::GetTeamNumber((CBaseEntity *)*piVar16);
        if ((this[0x1821] != (CTankClaw)0x0) && (cVar6 != '\0')) {
          *piVar16 = iVar9;
                    /* try { // try from 005611b3 to 005611ee has its CatchHandler @ 005615ea */
          piVar16[-1] = 0x5611b8;
          cVar7 = IsASurvivorTeam(iVar9);
          if (cVar7 != '\0') goto LAB_00560d08;
        }
        iVar12 = *piVar3;
        *piVar16 = (int)piVar3;
        pcVar4 = *(code **)(iVar12 + 300);
        piVar16[-1] = 0x560d7d;
        cVar7 = (*pcVar4)();
        if (cVar7 == '\0') goto LAB_00560d08;
        iVar12 = *piVar3;
        *piVar16 = (int)piVar3;
        pcVar4 = *(code **)(iVar12 + 0x16c);
        piVar16[-1] = 0x560d8c;
        cVar7 = (*pcVar4)();
        if (cVar7 == '\0') {
          local_1d8 = (int *)0x0;
        }
        else {
          *piVar16 = iVar9;
          piVar16[-1] = 0x5611d6;
          cVar7 = IsASurvivorTeam(iVar9);
          local_1d8 = piVar3;
          if (cVar7 != '\0') {
            iVar12 = *piVar3;
            *piVar16 = (int)piVar3;
            pcVar4 = *(code **)(iVar12 + 0x7e8);
            piVar16[-1] = 0x5611ef;
            cVar7 = (*pcVar4)();
            if (cVar7 == '\0') goto LAB_00560d08;
          }
        }
        piVar16[3] = 0;
        piVar16[2] = 0;
        piVar16[1] = 0;
        *piVar16 = (int)&local_cc;
        piVar16[-1] = 0x560dc4;
        CTraceFilterSimple::CTraceFilterSimple
                  ((CTraceFilterSimple *)*piVar16,(IHandleEntity *)piVar16[1],piVar16[2],
                   (_func_bool_IHandleEntity_ptr_int *)piVar16[3]);
        local_cc = &PTR_ShouldHitEntity_00c54558;
        iVar12 = *(int *)this_00;
        piVar16[1] = (int)this_00;
        *piVar16 = (int)&local_1a8;
        pcVar4 = *(code **)(iVar12 + 0x478);
        piVar16[-1] = 0x560de9;
        (*pcVar4)();
        iVar12 = *piVar3;
        piVar17 = piVar16 + -1;
        piVar16[-1] = (int)piVar3;
        pcVar4 = *(code **)(iVar12 + 0x288);
        piVar16[-2] = 0x560df7;
        pfVar10 = (float *)(*pcVar4)();
        ppuVar20 = (undefined **)(*pfVar10 - (float)local_1a8);
        local_e4 = 0;
        fVar19 = pfVar10[2] - local_1a0;
        local_d8 = 1;
        local_e8 = 0;
        fVar18 = pfVar10[1] - local_1a4;
        local_ec = 0;
        local_dc = 0;
        local_f4 = 0;
        local_f8 = 0;
        local_fc = 0;
        local_11c = local_1a8;
        local_118 = local_1a4;
        local_114 = local_1a0;
        local_d7 = (float)ppuVar20 * (float)ppuVar20 + fVar19 * fVar19 + fVar18 * fVar18 != 0.0;
        iVar12 = *enginetrace;
        piVar16[3] = (int)&local_70;
        piVar16[2] = (int)&local_cc;
        piVar16[1] = 0x600400b;
        *piVar16 = (int)&local_11c;
        piVar16[-1] = (int)enginetrace;
        pcVar4 = *(code **)(iVar12 + 0x14);
        piVar16[-2] = 0x560f18;
        local_10c = ppuVar20;
        local_108 = fVar18;
        local_104 = fVar19;
        (*pcVar4)();
        if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
          piVar16[5] = -0x40800000;
          *piVar16 = (int)local_64;
          piVar16[4] = 1;
          piVar16[3] = 0;
          piVar16[2] = 0;
          piVar16[1] = 0xff;
          piVar16[-1] = (int)&local_70;
          piVar16[-2] = 0x560f5e;
          DebugDrawLine((Vector *)piVar16[-1],(Vector *)*piVar16,piVar16[1],piVar16[2],piVar16[3],
                        SUB41(piVar16[4],0),(float)piVar16[5]);
        }
        pcVar4 = *(code **)(*(int *)this + 0x6d8);
        piVar16[1] = (int)&local_11c;
        piVar16[2] = 1;
        *piVar16 = (int)&local_70;
        piVar16[-1] = (int)this;
        piVar16[-2] = 0x560fb7;
        local_11c = ppuVar20;
        local_118 = fVar18;
        local_114 = fVar19;
        local_24 = piVar3;
        (*pcVar4)();
        *piVar16 = (int)piVar3;
        piVar16[-1] = (int)this;
        piVar16[-2] = 0x560fc3;
        CTerrorWeapon::MarkAsHit((CTerrorWeapon *)piVar16[-1],(CBaseEntity *)*piVar16);
        if (local_1d8 != (int *)0x0) {
          piVar16[-1] = iVar9;
          piVar16[-2] = 0x560fdb;
          cVar7 = IsASurvivorTeam(iVar9);
          if (cVar7 != '\0') {
            this[0x1821] = (CTankClaw)0x1;
          }
        }
        iVar14 = iVar14 + 1;
        local_1f5 = 1;
        piVar16 = piVar16 + -1;
      } while (iVar14 < *(int *)(this + 0x180c));
    }
LAB_00561000:
    if (0 < local_180[3]) {
      iVar14 = 0;
      piVar16 = piVar17;
      do {
        piVar3 = *(int **)(local_180[0] + iVar14 * 4);
        *piVar16 = (int)piVar3;
                    /* try { // try from 0056101c to 005610be has its CatchHandler @ 005615aa */
        piVar16[-1] = 0x561021;
        iVar9 = CBaseEntity::GetTeamNumber((CBaseEntity *)*piVar16);
        piVar17 = piVar16;
        if ((this[0x1821] == (CTankClaw)0x0) || (cVar6 == '\0')) {
LAB_0056103d:
          piVar16[3] = 0;
          piVar16[2] = 0;
          piVar16[1] = 0;
          *piVar16 = (int)&local_11c;
          piVar16[-1] = 0x561063;
          CTraceFilterSimple::CTraceFilterSimple
                    ((CTraceFilterSimple *)*piVar16,(IHandleEntity *)piVar16[1],piVar16[2],
                     (_func_bool_IHandleEntity_ptr_int *)piVar16[3]);
          local_11c = &PTR_ShouldHitEntity_00c54558;
          if (piVar3 == (int *)0x0) {
LAB_00561288:
            local_1ec = (int *)0x0;
          }
          else {
            iVar12 = *piVar3;
            *piVar16 = (int)piVar3;
            pcVar4 = *(code **)(iVar12 + 0x16c);
            piVar16[-1] = 0x561080;
            cVar7 = (*pcVar4)();
            if (cVar7 == '\0') goto LAB_00561288;
            *piVar16 = iVar9;
            piVar16[-1] = 0x561096;
            cVar7 = IsASurvivorTeam(iVar9);
            local_1ec = piVar3;
            if (cVar7 != '\0') {
              iVar12 = *piVar3;
              *piVar16 = (int)piVar3;
                    /* try { // try from 005612c5 to 0056152a has its CatchHandler @ 005615aa */
              pcVar4 = *(code **)(iVar12 + 0x7e8);
              piVar16[-1] = 0x5612cb;
              cVar7 = (*pcVar4)();
              if (cVar7 == '\0') goto LAB_00561218;
            }
          }
          iVar12 = *piVar3;
          *piVar16 = (int)piVar3;
          pcVar4 = *(code **)(iVar12 + 300);
          piVar16[-1] = 0x5610af;
          cVar7 = (*pcVar4)();
          if (cVar7 != '\0') {
            iVar12 = *piVar3;
            *piVar16 = (int)piVar3;
            pcVar4 = *(code **)(iVar12 + 0xc);
            piVar16[-1] = 0x5610bf;
            puVar11 = (uint *)(*pcVar4)();
            uVar2 = *puVar11;
            if (0 < *(int *)(this + 0x180c)) {
              iVar12 = 0;
              piVar1 = (int *)(g_pEntityList + (uVar2 & 0xfff) * 0x10 + 4);
              do {
                iVar15 = 0;
                if (uVar2 != 0xffffffff) {
                  if (piVar1 == (int *)0x0) {
                    iVar15 = 0;
                  }
                  else if (piVar1[1] == uVar2 >> 0xc) {
                    iVar15 = *piVar1;
                  }
                }
                uVar5 = *(uint *)(*(int *)(this + 0x1800) + iVar12 * 4);
                if (((uVar5 == 0xffffffff) ||
                    (puVar13 = g_pEntityList + (uVar5 & 0xfff) * 0x10,
                    puVar13 == (undefined *)0xfffffffc)) || (*(uint *)(puVar13 + 8) != uVar5 >> 0xc)
                   ) {
                  if (iVar15 == 0) goto LAB_00561218;
                }
                else if (iVar15 == *(int *)(puVar13 + 4)) goto LAB_00561218;
                iVar12 = iVar12 + 1;
              } while (iVar12 != *(int *)(this + 0x180c));
            }
          }
          iVar12 = *(int *)this_00;
          piVar16[1] = (int)this_00;
          *piVar16 = (int)&local_1a8;
          pcVar4 = *(code **)(iVar12 + 0x478);
          piVar16[-1] = 0x56131b;
          (*pcVar4)();
          iVar12 = *piVar3;
          piVar16[-1] = (int)piVar3;
          pcVar4 = *(code **)(iVar12 + 0x288);
          piVar16[-2] = 0x561329;
          pfVar10 = (float *)(*pcVar4)();
          local_88 = 1;
          local_94 = 0;
          local_98 = 0;
          local_9c = 0;
          ppuVar20 = (undefined **)(*pfVar10 - (float)local_1a8);
          local_8c = 0;
          local_a4 = 0;
          local_a8 = 0;
          local_ac = 0;
          fVar18 = pfVar10[1] - local_1a4;
          local_cc = local_1a8;
          local_c8 = local_1a4;
          fVar19 = pfVar10[2] - local_1a0;
          local_c4 = local_1a0;
          local_87 = fVar18 * fVar18 + (float)ppuVar20 * (float)ppuVar20 + fVar19 * fVar19 != 0.0;
          iVar12 = *enginetrace;
          piVar16[3] = (int)&local_70;
          piVar16[2] = (int)&local_11c;
          piVar16[1] = 0x600400b;
          *piVar16 = (int)&local_cc;
          piVar16[-1] = (int)enginetrace;
          pcVar4 = *(code **)(iVar12 + 0x14);
          piVar16[-2] = 0x561456;
          local_bc = ppuVar20;
          local_b8 = fVar18;
          local_b4 = fVar19;
          (*pcVar4)();
          if (*(int *)(r_visualizetraces._28_4_ + 0x30) != 0) {
            piVar16[5] = -0x40800000;
            *piVar16 = (int)local_64;
            piVar16[4] = 1;
            piVar16[3] = 0;
            piVar16[2] = 0;
            piVar16[1] = 0xff;
            piVar16[-1] = (int)&local_70;
            piVar16[-2] = 0x56149c;
            DebugDrawLine((Vector *)piVar16[-1],(Vector *)*piVar16,piVar16[1],piVar16[2],piVar16[3],
                          SUB41(piVar16[4],0),(float)piVar16[5]);
          }
          piVar17 = piVar16 + -1;
          if (local_44 == 1.0) {
            pcVar4 = *(code **)(*(int *)this + 0x6d8);
            piVar16[1] = (int)&local_cc;
            piVar16[2] = 1;
            *piVar16 = (int)&local_70;
            piVar16[-1] = (int)this;
            piVar16[-2] = 0x561507;
            local_cc = ppuVar20;
            local_c8 = fVar18;
            local_c4 = fVar19;
            local_24 = piVar3;
            (*pcVar4)();
            *piVar16 = (int)piVar3;
            piVar16[-1] = (int)this;
            piVar16[-2] = 0x561513;
            CTerrorWeapon::MarkAsHit((CTerrorWeapon *)piVar16[-1],(CBaseEntity *)*piVar16);
            if (local_1ec != (int *)0x0) {
              piVar16[-1] = iVar9;
              piVar16[-2] = 0x56152b;
              cVar7 = IsASurvivorTeam(iVar9);
              if (cVar7 != '\0') {
                this[0x1821] = (CTankClaw)0x1;
                local_1f5 = 1;
                piVar17 = piVar16 + -1;
                goto LAB_00561218;
              }
            }
            local_1f5 = 1;
            piVar17 = piVar16 + -1;
          }
        }
        else {
          *piVar16 = iVar9;
                    /* try { // try from 0056120b to 0056120f has its CatchHandler @ 005615aa */
          piVar16[-1] = 0x561210;
          cVar7 = IsASurvivorTeam(iVar9);
          if (cVar7 == '\0') goto LAB_0056103d;
        }
LAB_00561218:
        iVar14 = iVar14 + 1;
        piVar16 = piVar17;
      } while (iVar14 < local_180[3]);
    }
    this[0x1578] = (CTankClaw)0x0;
    iVar14 = *(int *)this;
    *piVar17 = (int)this;
    piVar17[1] = (uint)local_1f5;
                    /* try { // try from 0056123e to 00561243 has its CatchHandler @ 005615ea */
    pcVar4 = *(code **)(iVar14 + 0x6e0);
    piVar17[-1] = 0x561244;
    (*pcVar4)();
    local_19c = &PTR_EnumElement_00c50470;
    *piVar17 = (int)local_180;
    local_180[3] = 0;
    piVar17[-1] = 0x561266;
    CUtlMemory<CBaseEntity*,int>::Purge((CUtlMemory<CBaseEntity*,int> *)*piVar17);
    iVar14 = local_180[0];
    *piVar17 = (int)local_180;
    local_180[4] = iVar14;
    piVar17[-1] = 0x56127a;
    CUtlMemory<CBaseEntity*,int>::Purge((CUtlMemory<CBaseEntity*,int> *)*piVar17);
  }
  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)