CBreakableProp::OnPhysGunPickup
0x007ec750 · 245 bytes · __thiscall
_ZN14CBreakableProp15OnPhysGunPickupEP11CBasePlayer15PhysGunPickup_t
Decompiled
undefined (3 params)
/* CBreakableProp::OnPhysGunPickup(CBasePlayer*, PhysGunPickup_t) */
void __thiscall CBreakableProp::OnPhysGunPickup(CBreakableProp *param_1,int *param_2,int param_3)
{
CBreakableProp CVar1;
undefined4 *puVar2;
float fVar3;
CBreakableProp *pCVar4;
code *pcVar5;
undefined4 uVar6;
char *pcVar7;
undefined1 local_24 [20];
if (param_3 == 0) {
ForceFadeScaleToAlwaysVisible(param_1);
}
else {
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);
if (param_3 == 1) {
(**(code **)(*(int *)param_1 + 0x3ac))(param_1,pCVar4,pcVar5,uVar6,fVar3,pcVar7);
uVar6 = *(undefined4 *)(gpGlobals + 0xc);
goto joined_r0x007ec832;
}
}
uVar6 = *(undefined4 *)(gpGlobals + 0xc);
joined_r0x007ec832:
if (param_2 == (int *)0x0) {
*(undefined4 *)(param_1 + 0x14a4) = 0xffffffff;
}
else {
puVar2 = (undefined4 *)(**(code **)(*param_2 + 0xc))(param_2);
*(undefined4 *)(param_1 + 0x14a4) = *puVar2;
}
*(undefined4 *)(param_1 + 0x14a8) = uVar6;
CVar1 = (CBreakableProp)CBaseEntity::BlocksLOS((CBaseEntity *)param_1);
param_1[0x14ae] = CVar1;
CBaseEntity::SetBlocksLOS((CBaseEntity *)param_1,false);
return;
}
SourceMod gamedata
paste intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.