L L4D2node

CBaseCombatWeapon::ItemBusyFrame

0x00409420 · 195 bytes · __thiscall

_ZN17CBaseCombatWeapon13ItemBusyFrameEv

Decompiled

undefined (1 param)

/* CBaseCombatWeapon::ItemBusyFrame() */

void __thiscall CBaseCombatWeapon::ItemBusyFrame(CBaseCombatWeapon *this)

{
  CBaseEdict *this_00;
  char cVar1;
  int *piVar2;
  int iVar3;
  
  piVar2 = (int *)GetOwner(this);
  if (piVar2 != (int *)0x0) {
    cVar1 = (**(code **)(*piVar2 + 0x16c))(piVar2);
    if (cVar1 != '\0') {
      if ((*(float *)(this + 0x1408) + 0.5 < *(float *)(gpGlobals + 0xc)) &&
         (*(int *)(this + 0x1404) != 0)) {
        if (this[0x6c] == (CBaseCombatWeapon)0x0) {
          this_00 = *(CBaseEdict **)(this + 0x30);
          if (this_00 != (CBaseEdict *)0x0) {
            *(uint *)this_00 = *(uint *)this_00 | 0x101;
            iVar3 = CBaseEdict::GetChangeAccessor(this_00);
            *(undefined2 *)(iVar3 + 2) = 0;
          }
        }
        else {
          this[0x70] = (CBaseCombatWeapon)((byte)this[0x70] | 1);
        }
        *(undefined4 *)(this + 0x1404) = 0;
      }
      if ((((this[0x1459] != (CBaseCombatWeapon)0x0) && (*(int *)(this + 0x1404) == 0)) &&
          (this[0x145d] != (CBaseCombatWeapon)0x0)) && ((piVar2[0x72c] & 0x801U) != 0)) {
        QueueAttack(this,piVar2[0x72c] & 0x801U);
        return;
      }
    }
  }
  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)