CItemDefibrillator::ShouldContinueAction
0x00541dd0 · 301 bytes · __thiscall
_ZN18CItemDefibrillator20ShouldContinueActionEP13CTerrorPlayerP11CBaseEntityi
Decompiled
undefined (4 params)
/* CItemDefibrillator::ShouldContinueAction(CTerrorPlayer*, CBaseEntity*, int) */
undefined4 __thiscall
CItemDefibrillator::ShouldContinueAction
(CItemDefibrillator *this,CTerrorPlayer *param_1,CBaseEntity *param_2,int param_3)
{
code *pcVar1;
undefined4 uVar2;
int iVar3;
int *piVar4;
undefined4 uVar5;
uVar2 = CBaseBackpackItem::ShouldContinueAction((CBaseBackpackItem *)this,param_1,param_2,param_3)
;
if (((char)uVar2 == '\0') && (param_2 != (CBaseEntity *)0x0)) {
iVar3 = __dynamic_cast(param_2,&CBaseEntity::typeinfo,&CSurvivorDeathModel::typeinfo,0);
if (iVar3 != 0) {
iVar3 = CTerrorPlayer::GetPlayerByCharacter(*(undefined4 *)(iVar3 + 0x17d8));
if (iVar3 != 0) {
piVar4 = (int *)(**(code **)(*gameeventmanager + 0x1c))
(gameeventmanager,"defibrillator_interrupted",0,0);
if (piVar4 != (int *)0x0) {
pcVar1 = *(code **)(*piVar4 + 0x30);
uVar5 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(param_1 + 0x30));
(*pcVar1)(piVar4,"userid",uVar5);
pcVar1 = *(code **)(*piVar4 + 0x30);
uVar5 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(iVar3 + 0x30));
(*pcVar1)(piVar4,"subject",uVar5);
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar4,0);
}
}
}
}
return uVar2;
}
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.