L L4D2node

CGib::OnPhysGunDrop

0x006d4120 · 92 bytes · __cdecl

_ZN4CGib13OnPhysGunDropEP11CBasePlayer13PhysGunDrop_t

Decompiled

undefined (2 params)

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

void CGib::OnPhysGunDrop(int param_1,int *param_2)

{
  undefined4 uVar1;
  undefined4 uVar2;
  undefined4 *puVar3;
  
  uVar1 = *(undefined4 *)(gpGlobals + 0xc);
  if (param_2 != (int *)0x0) {
    puVar3 = (undefined4 *)(**(code **)(*param_2 + 0xc))(param_2);
    uVar2 = *puVar3;
    *(undefined4 *)(param_1 + 0x140c) = uVar1;
    *(undefined4 *)(param_1 + 0x1408) = uVar2;
    return;
  }
  *(undefined4 *)(param_1 + 0x1408) = 0xffffffff;
  *(undefined4 *)(param_1 + 0x140c) = uVar1;
  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)