L L4D2node

CBaseCombatWeapon::CBaseCombatWeapon

0x0040b310 · 401 bytes · __thiscall

_ZN17CBaseCombatWeaponC1Ev

Decompiled

undefined (1 param)

/* CBaseCombatWeapon::CBaseCombatWeapon() */

void __thiscall CBaseCombatWeapon::CBaseCombatWeapon(CBaseCombatWeapon *this)

{
  CBaseEdict *pCVar1;
  undefined2 uVar2;
  int iVar3;
  CBaseCombatWeapon *local_10;
  
  CBaseAnimating::CBaseAnimating((CBaseAnimating *)this);
  *(undefined ***)this = &PTR__CBaseCombatWeapon_00c08f68;
  *(undefined4 *)(this + 0x13f4) = 0xffffffff;
  *(undefined4 *)(this + 0x1470) = 0xffffffff;
  *(undefined4 *)(this + 0x1490) = 0;
  *(undefined4 *)(this + 0x149c) = 0xffffffff;
  *(undefined4 *)(this + 0x14a0) = 0;
  *(undefined4 *)(this + 0x14a8) = 0;
  *(undefined4 *)(this + 0x14b4) = 0xffffffff;
  *(undefined4 *)(this + 0x14b8) = 0;
  *(undefined4 *)(this + 0x14c0) = 0;
  *(undefined4 *)(this + 0x14cc) = 0xffffffff;
  *(undefined4 *)(this + 0x14d0) = 0;
  *(undefined4 *)(this + 0x14d8) = 0;
  *(undefined4 *)(this + 0x14e4) = 0xffffffff;
  *(undefined4 *)(this + 0x14e8) = 0;
  *(undefined4 *)(this + 0x1434) = 0x42820000;
  *(undefined4 *)(this + 0x1438) = 0x42820000;
  *(undefined4 *)(this + 0x143c) = 0x44800000;
  *(undefined4 *)(this + 0x1440) = 0x44800000;
  this[0x145d] = (CBaseCombatWeapon)0x0;
  if (this[0x1428] != (CBaseCombatWeapon)0x0) {
    if (this[0x6c] == (CBaseCombatWeapon)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
        iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar3 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseCombatWeapon)((byte)this[0x70] | 1);
    }
    this[0x1428] = (CBaseCombatWeapon)0x0;
  }
  if (*(int *)(this + 0x13f8) != 0) {
    if (this[0x6c] == (CBaseCombatWeapon)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
                    /* try { // try from 0040b415 to 0040b482 has its CatchHandler @ 0040b4ae */
        iVar3 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar3 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseCombatWeapon)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x13f8) = 0;
  }
  local_10 = this;
  *(undefined4 *)(this + 0x1478) = 0;
  CUtlLinkedList<CBaseCombatWeapon*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CBaseCombatWeapon*,unsigned_short>,unsigned_short>>
  ::InsertBefore((CUtlLinkedList<CBaseCombatWeapon*,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CBaseCombatWeapon*,unsigned_short>,unsigned_short>>
                  *)(g_WeaponList + 0xc),0xffff,&local_10);
  uVar2 = GetInvalidWeaponInfoHandle();
  *(undefined2 *)(this + 0x1474) = uVar2;
  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)