CItem_Adrenaline::CompleteUse
0x0053f5e0 · 372 bytes · __thiscall
_ZN16CItem_Adrenaline11CompleteUseEP13CTerrorPlayer
Decompiled
undefined (2 params)
/* CItem_Adrenaline::CompleteUse(CTerrorPlayer*) */
void __thiscall CItem_Adrenaline::CompleteUse(CItem_Adrenaline *this,CTerrorPlayer *param_1)
{
CEventLog *this_00;
undefined4 uVar1;
int iVar2;
int *piVar3;
int in_GS_OFFSET;
CFmtStrN<256> local_11c [5];
undefined1 local_117 [263];
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
CTerrorPlayer::OnAdrenalineUsed(param_1,*(float *)(adrenaline_duration._28_4_ + 0x2c));
this_00 = (CEventLog *)TheLog();
uVar1 = CEventLog::FormatPlayer(this_00,(CBaseEntity *)param_1);
CFmtStrN<256>::CFmtStrN(local_11c,"%s used adrenaline\n",uVar1);
UTIL_LogPrintf("%s",local_117);
DevMsg(2,"%s",local_117);
iVar2 = (**(code **)(*(int *)param_1 + 0x1fc))(param_1);
CTerrorPlayer::AddHealthBuffer
(param_1,*(float *)(adrenaline_health_buffer._28_4_ + 0x2c),(float)iVar2);
CBasePlayer::RumbleEffect((CBasePlayer *)param_1,'+','\0','\x04');
piVar3 = (int *)(**(code **)(*gameeventmanager + 0x1c))(gameeventmanager,"adrenaline_used",0,0);
if (piVar3 != (int *)0x0) {
uVar1 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(param_1 + 0x30));
(**(code **)(*piVar3 + 0x30))(piVar3,"userid",uVar1);
(**(code **)(*piVar3 + 0x30))(piVar3,"subject",uVar1);
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar3,0);
}
if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.