L L4D2node

Script_PickupObject

0x00b44b20 · 189 bytes · __cdecl

_ZL19Script_PickupObjectP9HSCRIPT__S0_

Decompiled

undefined (2 params)

/* Script_PickupObject(HSCRIPT__*, HSCRIPT__*) */

void Script_PickupObject(HSCRIPT__ *param_1,HSCRIPT__ *param_2)

{
  code *pcVar1;
  ScriptClassDesc_t *pSVar2;
  undefined4 uVar3;
  int iVar4;
  int *piVar5;
  
  if (param_2 == (HSCRIPT__ *)0x0) {
    uVar3 = 0;
  }
  else {
    pcVar1 = *(code **)(*g_pScriptVM + 0x68);
    pSVar2 = GetScriptDesc<CBaseEntity>((CBaseEntity *)0x0);
    uVar3 = (*pcVar1)(g_pScriptVM,param_2,pSVar2);
  }
  if (param_1 != (HSCRIPT__ *)0x0) {
    pcVar1 = *(code **)(*g_pScriptVM + 0x68);
    pSVar2 = GetScriptDesc<CBaseEntity>((CBaseEntity *)0x0);
    iVar4 = (*pcVar1)(g_pScriptVM,param_1,pSVar2);
    if (iVar4 != 0) {
      piVar5 = (int *)__dynamic_cast(iVar4,&CBaseEntity::typeinfo,&CTerrorPlayer::typeinfo,0);
      if (piVar5 != (int *)0x0) {
        (**(code **)(*piVar5 + 0x6ec))(piVar5,uVar3,0);
      }
    }
  }
  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)