CItemDefibrillator::OnStartAction
0x00541860 · 364 bytes · __cdecl
_ZN18CItemDefibrillator13OnStartActionEN17CBaseBackpackItem22BackpackItemActionTypeEP13CTerrorPlayerP11CBaseEntityf
Decompiled
undefined (4 params)
/* CItemDefibrillator::OnStartAction(CBaseBackpackItem::BackpackItemActionType, CTerrorPlayer*,
CBaseEntity*, float) */
void CItemDefibrillator::OnStartAction
(undefined4 param_1,undefined4 param_2,CBaseEntity *param_3,int param_4)
{
code *pcVar1;
int iVar2;
int *piVar3;
undefined4 uVar4;
CAI_Concept local_24 [20];
CBaseEntity::EmitSound(param_3,"Defibrillator.UseStart",0.0,(float *)0x0);
pcVar1 = *(code **)(*(int *)param_3 + 0x7b4);
CAI_Concept::CAI_Concept(local_24,"PlayerUsingDefibrillator");
(*pcVar1)(param_3,local_24,1,0,0,0,0);
if (param_4 != 0) {
iVar2 = __dynamic_cast(param_4,&CBaseEntity::typeinfo,&CSurvivorDeathModel::typeinfo,0);
if (iVar2 != 0) {
iVar2 = CTerrorPlayer::GetPlayerByCharacter(*(undefined4 *)(iVar2 + 0x17d8));
if (iVar2 != 0) {
piVar3 = (int *)(**(code **)(*gameeventmanager + 0x1c))
(gameeventmanager,"defibrillator_begin",0,0);
if (piVar3 != (int *)0x0) {
pcVar1 = *(code **)(*piVar3 + 0x30);
uVar4 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(param_3 + 0x30));
(*pcVar1)(piVar3,"userid",uVar4);
pcVar1 = *(code **)(*piVar3 + 0x30);
uVar4 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(iVar2 + 0x30));
(*pcVar1)(piVar3,"subject",uVar4);
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar3,0);
}
}
}
}
return;
}
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.