L L4D2node

CStripWeapons::InputStripActiveWeapon

0x007a80f0 · 114 bytes · __thiscall

_ZN13CStripWeapons22InputStripActiveWeaponER11inputdata_t

Decompiled

undefined (2 params)

/* CStripWeapons::InputStripActiveWeapon(inputdata_t&) */

void __thiscall CStripWeapons::InputStripActiveWeapon(CStripWeapons *this,inputdata_t *param_1)

{
  int *piVar1;
  char cVar2;
  CBaseEntity *pCVar3;
  CBaseCombatCharacter *this_00;
  
  piVar1 = *(int **)param_1;
  if ((piVar1 == (int *)0x0) || (cVar2 = (**(code **)(*piVar1 + 0x16c))(piVar1), cVar2 == '\0')) {
    cVar2 = (**(code **)(*g_pGameRules + 0xd0))(g_pGameRules);
    if (cVar2 != '\0') {
      return;
    }
    this_00 = (CBaseCombatCharacter *)UTIL_GetLocalPlayer();
  }
  else {
    this_00 = *(CBaseCombatCharacter **)param_1;
  }
  if ((this_00 != (CBaseCombatCharacter *)0x0) &&
     (pCVar3 = (CBaseEntity *)CBaseCombatCharacter::GetActiveWeapon(this_00),
     pCVar3 != (CBaseEntity *)0x0)) {
    CBaseCombatCharacter::Weapon_Detach(this_00,(CBaseCombatWeapon *)pCVar3);
    UTIL_Remove(pCVar3);
    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)