L L4D2node

CWeaponSpawn::ShouldAllowDuplicatePickup

0x008d6ce0 · 133 bytes · __thiscall

_ZN12CWeaponSpawn26ShouldAllowDuplicatePickupEP13CTerrorWeapon

Decompiled

undefined (2 params)

/* CWeaponSpawn::ShouldAllowDuplicatePickup(CTerrorWeapon*) */

bool __thiscall CWeaponSpawn::ShouldAllowDuplicatePickup(CWeaponSpawn *this,CTerrorWeapon *param_1)

{
  int iVar1;
  int iVar2;
  undefined4 uVar3;
  char *pcVar4;
  char *pcVar5;
  bool bVar6;
  
  iVar1 = (**(code **)(*(int *)this + 0x3cc))(this);
  iVar2 = GetWeaponInfo(iVar1);
  if (iVar2 != 0) {
    bVar6 = true;
    if ((iVar1 != 0x14) && (*(int *)(iVar2 + 0x894) != 0xd)) {
      uVar3 = (**(code **)(*(int *)this + 0x3cc))(this);
      pcVar4 = (char *)WeaponIDToClassname(uVar3);
      pcVar5 = "";
      if (*(char **)(param_1 + 0x7c) != (char *)0x0) {
        pcVar5 = *(char **)(param_1 + 0x7c);
      }
      bVar6 = false;
      if (pcVar4 != pcVar5) {
        iVar1 = _V_stricmp(pcVar4,pcVar5);
        bVar6 = iVar1 != 0;
      }
    }
    return bVar6;
  }
  return false;
}

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)