L L4D2node

CBreakableProp::OnPhysGunDrop

0x007e6a60 · 198 bytes · __thiscall

_ZN14CBreakableProp13OnPhysGunDropEP11CBasePlayer13PhysGunDrop_t

Decompiled

undefined (3 params)

/* CBreakableProp::OnPhysGunDrop(CBasePlayer*, PhysGunDrop_t) */

void __thiscall CBreakableProp::OnPhysGunDrop(CBreakableProp *param_1,int *param_2,int param_3)

{
  undefined4 uVar1;
  undefined4 *puVar2;
  float fVar3;
  CBreakableProp *pCVar4;
  code *pcVar5;
  undefined4 uVar6;
  char *pcVar7;
  undefined1 local_24 [20];
  
  fVar3 = *(float *)(gpGlobals + 0xc) + 2.0;
  pcVar7 = "FadeScaleThink";
  pcVar5 = RampToDefaultFadeScale;
  uVar6 = 0;
  pCVar4 = param_1;
  CBaseEntity::ThinkSet((_func_void *)local_24,(float)param_1,(char *)RampToDefaultFadeScale);
  uVar1 = *(undefined4 *)(gpGlobals + 0xc);
  if (param_2 == (int *)0x0) {
    *(undefined4 *)(param_1 + 0x14a8) = uVar1;
    *(undefined4 *)(param_1 + 0x14a4) = 0xffffffff;
  }
  else {
    puVar2 = (undefined4 *)(**(code **)(*param_2 + 0xc))(param_2,pCVar4,pcVar5,uVar6,fVar3,pcVar7);
    uVar6 = *puVar2;
    *(undefined4 *)(param_1 + 0x14a8) = uVar1;
    *(undefined4 *)(param_1 + 0x14a4) = uVar6;
  }
  if (param_3 == 1) {
    (**(code **)(*(int *)param_1 + 0x3ac))(param_1);
  }
  CBaseEntity::SetBlocksLOS((CBaseEntity *)param_1,(bool)param_1[0x14ae]);
  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)