CItemAmmoPack::ShouldStartAction
0x00540090 · 200 bytes · __cdecl
_ZN13CItemAmmoPack17ShouldStartActionEN17CBaseBackpackItem22BackpackItemActionTypeEP13CTerrorPlayerP11CBaseEntity
Decompiled
undefined (3 params)
/* CItemAmmoPack::ShouldStartAction(CBaseBackpackItem::BackpackItemActionType, CTerrorPlayer*,
CBaseEntity*) */
undefined4 CItemAmmoPack::ShouldStartAction(void)
{
int iVar1;
char cVar2;
CBaseCombatWeapon *this;
undefined4 uVar3;
int iVar4;
int *piVar5;
int *in_stack_00000010;
cVar2 = (**(code **)(*in_stack_00000010 + 0x16c))(in_stack_00000010);
if (cVar2 != '\0') {
cVar2 = (**(code **)(*in_stack_00000010 + 0x16c))(in_stack_00000010);
piVar5 = (int *)0x0;
if (cVar2 != '\0') {
piVar5 = in_stack_00000010;
}
this = (CBaseCombatWeapon *)(**(code **)(*piVar5 + 0x484))(piVar5,0);
if (((this != (CBaseCombatWeapon *)0x0) &&
(cVar2 = CBaseCombatWeapon::UsesPrimaryAmmo(this), cVar2 != '\0')) &&
((cVar2 = (**(code **)(*g_pGameRules + 0x178))
(g_pGameRules,piVar5,*(undefined4 *)(this + 0x1418)), cVar2 != '\0' ||
(iVar1 = *(int *)(this + 0x1420), iVar4 = (**(code **)(*(int *)this + 0x510))(this),
iVar1 < iVar4)))) {
uVar3 = CBaseBackpackItem::ShouldStartAction();
return uVar3;
}
}
return 0;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.