CCarriedPropWeapon::DropCarriedProp
0x00531480 · 245 bytes · __thiscall
_ZN18CCarriedPropWeapon15DropCarriedPropEb
Decompiled
undefined (2 params)
/* CCarriedPropWeapon::DropCarriedProp(bool) */
undefined4 __thiscall CCarriedPropWeapon::DropCarriedProp(CCarriedPropWeapon *this,bool param_1)
{
uint uVar1;
int iVar2;
CCSPlayer *this_00;
undefined4 uVar3;
undefined *puVar4;
this_00 = (CCSPlayer *)CBaseCombatWeapon::GetOwner((CBaseCombatWeapon *)this);
if ((this_00 == (CCSPlayer *)0x0) ||
(uVar3 = (**(code **)(*(int *)this_00 + 0x16c))(this_00), (char)uVar3 == '\0')) {
return 0;
}
CGlowProperty::SetGlowState((CGlowProperty *)(this + 0x1f0),*(int *)(this + 0x17fc));
uVar1 = *(uint *)(this_00 + 0x2064);
if ((uVar1 != 0xffffffff) &&
((puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc &&
(*(uint *)(puVar4 + 8) == uVar1 >> 0xc)))) {
iVar2 = *(int *)(puVar4 + 4);
CCSPlayer::DropWeapon(this_00,(CBaseCombatWeapon *)this,param_1,(Vector *)0x0);
if (iVar2 == 0) {
return uVar3;
}
(**(code **)(*(int *)this_00 + 0x474))(this_00,iVar2,0);
return uVar3;
}
CCSPlayer::DropWeapon(this_00,(CBaseCombatWeapon *)this,param_1,(Vector *)0x0);
return uVar3;
}
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.