CBaseBackpackItem::StartAction
0x00524b70 · 482 bytes · __cdecl
_ZN17CBaseBackpackItem11StartActionENS_22BackpackItemActionTypeENS_25BackpackItemActionTriggerE
Decompiled
undefined (2 params)
/* CBaseBackpackItem::StartAction(CBaseBackpackItem::BackpackItemActionType,
CBaseBackpackItem::BackpackItemActionTrigger) */
char CBaseBackpackItem::StartAction(CTerrorWeapon *param_1,undefined4 param_2)
{
CBaseEdict *this;
char cVar1;
char cVar2;
CTerrorPlayer *this_00;
int iVar3;
int iVar4;
undefined4 uVar5;
longdouble lVar6;
float local_20;
this_00 = (CTerrorPlayer *)CTerrorWeapon::GetPlayerOwner(param_1);
if (this_00 != (CTerrorPlayer *)0x0) {
iVar3 = (**(code **)(*(int *)param_1 + 0x700))(param_1,this_00,param_2);
if (iVar3 != 0) {
cVar1 = (**(code **)(*(int *)param_1 + 0x704))(param_1,param_2,this_00,iVar3);
if (cVar1 != '\0') {
if (param_1[0x17dc] != (CTerrorWeapon)0x1) {
if (param_1[0x6c] == (CTerrorWeapon)0x0) {
this = *(CBaseEdict **)(param_1 + 0x30);
if (this != (CBaseEdict *)0x0) {
*(uint *)this = *(uint *)this | 0x101;
iVar4 = CBaseEdict::GetChangeAccessor(this);
*(undefined2 *)(iVar4 + 2) = 0;
}
}
else {
param_1[0x70] = (CTerrorWeapon)((byte)param_1[0x70] | 1);
}
param_1[0x17dc] = (CTerrorWeapon)0x1;
}
lVar6 = (longdouble)(**(code **)(*(int *)param_1 + 0x710))(param_1);
local_20 = (float)lVar6;
cVar2 = CTerrorPlayer::IsAdrenalineActive(this_00);
if (cVar2 != '\0') {
local_20 = local_20 * *(float *)(adrenaline_backpack_speedup._28_4_ + 0x2c);
}
lVar6 = (longdouble)CountdownTimer::Now();
if ((float)lVar6 + local_20 != *(float *)(param_1 + 0x17e8)) {
(**(code **)(*(int *)(param_1 + 0x17e0) + 4))(param_1 + 0x17e0,param_1 + 0x17e8);
*(float *)(param_1 + 0x17e8) = (float)lVar6 + local_20;
}
if (local_20 != *(float *)(param_1 + 0x17e4)) {
(**(code **)(*(int *)(param_1 + 0x17e0) + 4))(param_1 + 0x17e0,param_1 + 0x17e4);
*(float *)(param_1 + 0x17e4) = local_20;
}
uVar5 = (**(code **)(*(int *)param_1 + 0x714))(param_1);
CTerrorPlayer::StartUseAction(this_00,uVar5,iVar3,local_20,1);
*(undefined4 *)(param_1 + 0x17ec) = param_2;
(**(code **)(*(int *)param_1 + 0x70c))(param_1,param_2,this_00,iVar3,local_20);
return cVar1;
}
}
}
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.