L L4D2node

CBaseBackpackItem::CompleteAction

0x00525390 · 279 bytes · __thiscall

_ZN17CBaseBackpackItem14CompleteActionEv

Decompiled

undefined (1 param)

/* CBaseBackpackItem::CompleteAction() */

void __thiscall CBaseBackpackItem::CompleteAction(CBaseBackpackItem *this)

{
  char cVar1;
  CTerrorPlayer *this_00;
  CBaseEntity *pCVar2;
  int iVar3;
  CBaseEntity *this_01;
  
  this_00 = (CTerrorPlayer *)CTerrorWeapon::GetPlayerOwner((CTerrorWeapon *)this);
  if (this_00 == (CTerrorPlayer *)0x0) {
    return;
  }
  pCVar2 = (CBaseEntity *)CTerrorPlayer::GetEntityIAmPerformingActionOn(this_00);
  if (pCVar2 == (CBaseEntity *)0x0) {
    return;
  }
  cVar1 = (**(code **)(*(int *)pCVar2 + 0x16c))(pCVar2);
  if (cVar1 != '\0') {
    cVar1 = (**(code **)(*(int *)pCVar2 + 0x16c))(pCVar2);
    this_01 = (CBaseEntity *)0x0;
    if (cVar1 != '\0') {
      this_01 = pCVar2;
    }
    cVar1 = (**(code **)(*(int *)this_01 + 300))(this_01);
    if (cVar1 == '\0') {
      return;
    }
    cVar1 = (**(code **)(*(int *)this_01 + 0x7e8))(this_01);
    if (cVar1 != '\0') {
      return;
    }
    iVar3 = CBaseEntity::GetTeamNumber(this_01);
    cVar1 = IsASurvivorTeam(iVar3);
    if (cVar1 == '\0') {
      return;
    }
  }
  if (*(float *)(this + 0x17e8) != -1.0) {
    (**(code **)(*(int *)(this + 0x17e0) + 4))(this + 0x17e0,this + 0x17e8);
    *(undefined4 *)(this + 0x17e8) = 0xbf800000;
  }
  (**(code **)(*(int *)this_00 + 0x470))(this_00,this,0,0);
  UTIL_Remove((CBaseEntity *)this);
  (**(code **)(*(int *)this + 0x720))(this,this_00,pCVar2);
  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)