L L4D2node

CRagdollProp::OnPhysGunPickup

0x00797210 · 330 bytes · __thiscall

_ZN12CRagdollProp15OnPhysGunPickupEP11CBasePlayer15PhysGunPickup_t

Decompiled

undefined (3 params)

/* CRagdollProp::OnPhysGunPickup(CBasePlayer*, PhysGunPickup_t) */

void __thiscall CRagdollProp::OnPhysGunPickup(CRagdollProp *this,int *param_1,int param_3)

{
  char cVar1;
  undefined4 *puVar2;
  uint uVar3;
  CRagdollProp *pCVar4;
  float fVar5;
  int iVar6;
  
  if (param_1 == (int *)0x0) {
    *(undefined4 *)(this + 0x1eb8) = 0xffffffff;
  }
  else {
    puVar2 = (undefined4 *)(**(code **)(*param_1 + 0xc))(param_1);
    *(undefined4 *)(this + 0x1eb8) = *puVar2;
  }
  *(undefined4 *)(this + 0x1ebc) = *(undefined4 *)(gpGlobals + 0xc);
  if (this[0x1ecc] != (CRagdollProp)0x0) {
    *(undefined4 *)(this + 0x1ec8) = 0;
  }
  this[0x1ecc] = (CRagdollProp)0x1;
  cVar1 = HasPhysgunInteraction(this,"onpickup","boogie");
  if (cVar1 != '\0') {
    if (param_3 == 1) {
      iVar6 = 0x10000;
      fVar5 = 3.0;
    }
    else {
      iVar6 = 0;
      fVar5 = 2.0;
    }
    CRagdollBoogie::Create((CBaseEntity *)this,150.0,*(float *)(gpGlobals + 0xc),fVar5,iVar6);
  }
  uVar3 = *(uint *)(this + 0x148);
  if ((uVar3 & 0x1000) != 0) {
    CRagdollLRURetirement::MoveToTopOfLRU((CRagdollLRURetirement *)s_RagdollLRU,this,1);
    uVar3 = *(uint *)(this + 0x148);
  }
  if (((uVar3 & 0x40) != 0) && (0 < *(int *)(this + 0x13f8))) {
    iVar6 = 0;
    pCVar4 = this + 0x1410;
    do {
      iVar6 = iVar6 + 1;
      (**(code **)(**(int **)pCVar4 + 100))(*(int **)pCVar4);
      (**(code **)(**(int **)pCVar4 + 0x40))(*(int **)pCVar4,1);
      pCVar4 = pCVar4 + 0x54;
    } while (iVar6 < *(int *)(this + 0x13f8));
  }
  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)