L L4D2node

CGasCan::Equip

0x00538760 · 369 bytes · __thiscall

_ZN7CGasCan5EquipEP20CBaseCombatCharacter

Decompiled

undefined (2 params)

/* CGasCan::Equip(CBaseCombatCharacter*) */

void __thiscall CGasCan::Equip(CGasCan *this,CBaseCombatCharacter *param_1)

{
  code *pcVar1;
  char cVar2;
  CBaseEntity *pCVar3;
  undefined4 *puVar4;
  undefined4 local_30 [3];
  undefined4 local_24;
  undefined4 local_20;
  
  pCVar3 = (CBaseEntity *)(**(code **)(*(int *)this + 0x72c))(this);
  if (pCVar3 != (CBaseEntity *)0x0) {
    local_30[0] = 0;
    local_24 = 0xffffffff;
    local_20 = 0;
    CBaseEntity::FireNamedOutput(pCVar3,"OnItemPickedUp",(CAI_Concept *)local_30,0,0,0);
    if (*(int *)(scavenge_cluster_remove_on_pour._28_4_ + 0x30) == 0) {
      local_30[0] = 0xffffffff;
      puVar4 = (undefined4 *)(**(code **)(*(int *)pCVar3 + 0xc))(pCVar3);
      local_30[0] = *puVar4;
      CDirectorScavengeMode::ClearScavengeItem
                (*(CDirectorScavengeMode **)(TheDirector + 0x644),(CAI_Concept *)local_30);
    }
    if (param_1 != (CBaseCombatCharacter *)0x0) {
      cVar2 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
      if (cVar2 != '\0') {
        pcVar1 = *(code **)(*(int *)param_1 + 0x7b4);
        CAI_Concept::CAI_Concept((CAI_Concept *)local_30,"PlayerEquippedScavengeItem");
        (*pcVar1)(param_1,(CAI_Concept *)local_30,1,0,0,0,0);
      }
    }
  }
  this[0x1824] = (CGasCan)0x1;
  *(undefined4 *)(this + 0x1820) = 0;
  CGlowProperty::SetGlowColorOverride((CGlowProperty *)(this + 0x1f0),0x80ff);
  *(undefined4 *)(this + 0x1828) = 0;
  if (this[0x204] != (CGasCan)0x0) {
    (**(code **)(*(int *)(this + 0x1f0) + 4))((CGlowProperty *)(this + 0x1f0),this + 0x204);
    this[0x204] = (CGasCan)0x0;
  }
  CCarriedPropWeapon::Equip((CCarriedPropWeapon *)this,param_1);
  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)