L L4D2node

CTerrorMeleeWeapon::GetSecondaryAttackActivity

0x00568eb0 · 244 bytes · __thiscall

_ZN18CTerrorMeleeWeapon26GetSecondaryAttackActivityEP16CMeleeWeaponInfo

Decompiled

undefined (2 params)

/* CTerrorMeleeWeapon::GetSecondaryAttackActivity(CMeleeWeaponInfo*) */

undefined4 __thiscall
CTerrorMeleeWeapon::GetSecondaryAttackActivity(CTerrorMeleeWeapon *this,CMeleeWeaponInfo *param_1)

{
  CBaseEdict *pCVar1;
  CTerrorMeleeWeapon CVar2;
  int iVar3;
  undefined4 *puVar4;
  int iVar5;
  
  if (*(int *)(param_1 + 0xc40) < 1) {
    return 0xc0;
  }
  iVar3 = *(int *)(this + 0x1804);
  if (iVar3 < *(int *)(param_1 + 0xc40)) {
    if (7 < iVar3) {
      if (iVar3 == 0) {
        CVar2 = this[0x6c];
        iVar5 = 1;
        puVar4 = *(undefined4 **)(param_1 + 0xc34);
        *(undefined4 **)(this + 0x1824) = puVar4;
        goto joined_r0x00568f99;
      }
      goto LAB_00568edc;
    }
    iVar5 = iVar3 + 1;
    CVar2 = this[0x6c];
    iVar3 = iVar3 * 0x30;
  }
  else {
LAB_00568edc:
    if (this[0x6c] == (CTerrorMeleeWeapon)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      CVar2 = (CTerrorMeleeWeapon)0x0;
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
        iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar3 + 2) = 0;
        CVar2 = this[0x6c];
      }
    }
    else {
      this[0x70] = (CTerrorMeleeWeapon)((byte)this[0x70] | 1);
      CVar2 = (CTerrorMeleeWeapon)0x1;
    }
    *(undefined4 *)(this + 0x1804) = 0;
    iVar5 = 1;
    iVar3 = 0;
  }
  puVar4 = (undefined4 *)(iVar3 + *(int *)(param_1 + 0xc34));
  *(undefined4 **)(this + 0x1824) = puVar4;
joined_r0x00568f99:
  if (CVar2 == (CTerrorMeleeWeapon)0x0) {
    pCVar1 = *(CBaseEdict **)(this + 0x30);
    if (pCVar1 != (CBaseEdict *)0x0) {
      *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
      iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
      *(undefined2 *)(iVar3 + 2) = 0;
      puVar4 = *(undefined4 **)(this + 0x1824);
    }
  }
  else {
    this[0x70] = (CTerrorMeleeWeapon)((byte)this[0x70] | 1);
  }
  *(int *)(this + 0x1804) = iVar5;
  return *puVar4;
}

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)