CTeamplayRules::DeathNotice
0x004d12d0 · 355 bytes · __thiscall
_ZN14CTeamplayRules11DeathNoticeEP11CBasePlayerRK15CTakeDamageInfo
Decompiled
undefined (3 params)
/* CTeamplayRules::DeathNotice(CBasePlayer*, CTakeDamageInfo const&) */
void __thiscall
CTeamplayRules::DeathNotice(CTeamplayRules *this,CBasePlayer *param_1,CTakeDamageInfo *param_2)
{
uint uVar1;
CBasePlayer *pCVar2;
code *pcVar3;
char cVar4;
int iVar5;
int *piVar6;
undefined4 uVar7;
undefined *puVar8;
if (this[0x38] != (CTeamplayRules)0x0) {
return;
}
uVar1 = *(uint *)(param_2 + 0x34);
if (((((uVar1 != 0xffffffff) &&
(puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar8 + 8) == uVar1 >> 0xc)) &&
((pCVar2 = *(CBasePlayer **)(puVar8 + 4), param_1 != (CBasePlayer *)0x0 &&
(pCVar2 != (CBasePlayer *)0x0)))) &&
((cVar4 = (**(code **)(*(int *)pCVar2 + 0x16c))(pCVar2), cVar4 != '\0' &&
((param_1 != pCVar2 &&
(iVar5 = (**(code **)(*(int *)this + 0x1a4))(this,param_1,pCVar2), iVar5 == 1)))))) {
piVar6 = (int *)(**(code **)(*gameeventmanager + 0x1c))(gameeventmanager,"player_death",0,0);
if (piVar6 == (int *)0x0) {
return;
}
pcVar3 = *(code **)(*piVar6 + 0x30);
uVar7 = (**(code **)(*engine + 0x40))(engine,*(int *)(pCVar2 + 0x30));
(*pcVar3)(piVar6,"killer",uVar7);
pcVar3 = *(code **)(*piVar6 + 0x30);
uVar7 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(param_1 + 0x30));
(*pcVar3)(piVar6,"victim",uVar7);
(**(code **)(*piVar6 + 0x30))(piVar6,"priority",7);
/* WARNING: Could not recover jumptable at 0x004d142e. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*gameeventmanager + 0x20))();
return;
}
CMultiplayRules::DeathNotice((CMultiplayRules *)this,param_1,param_2);
return;
}
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.