L L4D2node

CTerrorPlayer::DropWeapons

0x00995ca0 · 171 bytes · __cdecl

_ZN13CTerrorPlayer11DropWeaponsEb

Decompiled

undefined (1 param)

/* CTerrorPlayer::DropWeapons(bool) */

void CTerrorPlayer::DropWeapons(bool param_1)

{
  uint uVar1;
  CBaseCombatWeapon *this;
  int iVar2;
  undefined *puVar3;
  int iVar4;
  undefined3 in_stack_00000005;
  
  iVar4 = 0;
  iVar2 = CBaseEntity::GetTeamNumber(_param_1);
  if (iVar2 == 3) {
    return;
  }
  do {
    while ((((uVar1 = *(uint *)(_param_1 + iVar4 * 4 + 0x18f4), uVar1 == 0xffffffff ||
             (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 == (undefined *)0xfffffffc))
            || (*(uint *)(puVar3 + 8) != uVar1 >> 0xc)) ||
           (this = *(CBaseCombatWeapon **)(puVar3 + 4), this == (CBaseCombatWeapon *)0x0))) {
LAB_00995cc0:
      iVar4 = iVar4 + 1;
      if (iVar4 == 0x38) {
        return;
      }
    }
    iVar2 = (**(code **)(*(int *)this + 0x530))(this);
    if (iVar2 != 1) {
      CCSPlayer::CSWeaponDrop((CCSPlayer *)_param_1,this,true,false,(Vector *)0x0);
      goto LAB_00995cc0;
    }
    iVar4 = iVar4 + 1;
    CBaseCombatWeapon::DestroyItem(this);
    if (iVar4 == 0x38) {
      return;
    }
  } while( true );
}

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)