L L4D2node

CTankRock::Detonate

0x004dd670 · 743 bytes · __thiscall

_ZN9CTankRock8DetonateEv

Decompiled

undefined (1 param)

/* CTankRock::Detonate() */

void __thiscall CTankRock::Detonate(CTankRock *this)

{
  CTankRock *pCVar1;
  code *pcVar2;
  undefined4 uVar3;
  undefined4 uVar4;
  uint uVar5;
  Vector *pVVar6;
  undefined4 uVar7;
  undefined4 local_48;
  undefined4 local_44;
  undefined4 local_40;
  undefined **local_3c [11];
  
  if (this[0x1a74] != (CTankRock)0x0) {
    if (1.0 < *(float *)(ZombieHulkThrowInterval._28_4_ + 0x2c)) {
      pCVar1 = this + 0x37c;
      if (*(int *)(this + 0x1a70) == 0x4f) {
        if ((((byte)this[0x14d] & 8) != 0) &&
           (CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this), ((byte)this[0x14d] & 8) != 0)) {
          CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
        }
        DispatchParticleEffect
                  ("tank_rock_throw_impact_stump",*(undefined4 *)(this + 0x2e0),
                   *(undefined4 *)(this + 0x2e4),*(undefined4 *)(this + 0x2e8),*(undefined4 *)pCVar1
                   ,*(undefined4 *)(this + 0x380),*(undefined4 *)(this + 900),0,0,0xffffffff);
        uVar5 = *(uint *)(this + 0x14c);
      }
      else {
        if ((((byte)this[0x14d] & 8) != 0) &&
           (CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this), ((byte)this[0x14d] & 8) != 0)) {
          CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
        }
        DispatchParticleEffect
                  ("tank_rock_throw_impact",*(undefined4 *)(this + 0x2e0),
                   *(undefined4 *)(this + 0x2e4),*(undefined4 *)(this + 0x2e8),*(undefined4 *)pCVar1
                   ,*(undefined4 *)(this + 0x380),*(undefined4 *)(this + 900),0,0,0xffffffff);
        uVar5 = *(uint *)(this + 0x14c);
      }
      if ((uVar5 & 0x1000) != 0) {
        CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)this);
        uVar5 = *(uint *)(this + 0x14c);
      }
      local_48 = *(undefined4 *)(this + 0x274);
      local_44 = *(undefined4 *)(this + 0x278);
      local_40 = *(undefined4 *)(this + 0x27c);
      if (((uVar5 & 0x800) != 0) &&
         (CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this), ((byte)this[0x14d] & 8) != 0)) {
        CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
      }
      pVVar6 = (Vector *)(**(code **)(*(int *)this + 0x288))(this);
      CRecipientFilter::CRecipientFilter((CRecipientFilter *)local_3c);
      local_3c[0] = &PTR__CPASFilter_00bfaf28;
                    /* try { // try from 004dd776 to 004dd77a has its CatchHandler @ 004dd972 */
      CRecipientFilter::AddRecipientsByPAS((CRecipientFilter *)local_3c,pVVar6);
      pcVar2 = *(code **)(*(int *)te + 0xa0);
      uVar3 = *(undefined4 *)(this + 0xd4);
                    /* try { // try from 004dd8db to 004dd8f4 has its CatchHandler @ 004dd984 */
      if ((((byte)this[0x14d] & 8) != 0) &&
         (CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this), ((byte)this[0x14d] & 8) != 0)) {
        CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
      }
      uVar4 = *(undefined4 *)(this + 0x458);
                    /* try { // try from 004dd7b8 to 004dd817 has its CatchHandler @ 004dd984 */
      uVar7 = (**(code **)(*(int *)this + 0x1c))(this);
      (*pcVar2)(te,(CRecipientFilter *)local_3c,0xbf800000,uVar7,uVar4,this + 0x2e0,pCVar1,&local_48
                ,1,uVar3,0xff,0xff,0xff);
      local_3c[0] = &PTR__CPASFilter_00bfaf28;
      CRecipientFilter::~CRecipientFilter((CRecipientFilter *)local_3c);
    }
    CBaseEntity::StopSound((CBaseEntity *)this,"HulkZombie.Throw.FlyLoop");
    UTIL_Remove((CBaseEntity *)this);
  }
  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)