CMultiplayRules::DeathNotice
0x0046e940 · 534 bytes · __thiscall
_ZN15CMultiplayRules11DeathNoticeEP11CBasePlayerRK15CTakeDamageInfo
Decompiled
undefined (3 params)
/* CMultiplayRules::DeathNotice(CBasePlayer*, CTakeDamageInfo const&) */
void __thiscall
CMultiplayRules::DeathNotice(CMultiplayRules *this,CBasePlayer *param_1,CTakeDamageInfo *param_2)
{
uint uVar1;
code *pcVar2;
CBaseCombatCharacter *pCVar3;
int *piVar4;
undefined4 uVar5;
int iVar6;
undefined4 uVar7;
undefined *puVar8;
CBaseCombatCharacter *local_24;
local_24 = (CBaseCombatCharacter *)0x0;
uVar1 = *(uint *)(param_2 + 0x30);
if (((uVar1 != 0xffffffff) &&
(puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar8 + 8) == uVar1 >> 0xc)) {
local_24 = *(CBaseCombatCharacter **)(puVar8 + 4);
}
uVar1 = *(uint *)(param_2 + 0x34);
uVar7 = 0;
if (((uVar1 != 0xffffffff) &&
(puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar8 + 8) == uVar1 >> 0xc)) {
uVar7 = *(undefined4 *)(puVar8 + 4);
}
pCVar3 = (CBaseCombatCharacter *)(**(code **)(*(int *)this + 0x228))(this,uVar7,local_24,param_1);
if (*(int *)(param_2 + 0x4c) == 0) {
if (pCVar3 != (CBaseCombatCharacter *)0x0) {
uVar7 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(pCVar3 + 0x30));
if ((local_24 != (CBaseCombatCharacter *)0x0) && (pCVar3 == local_24)) {
iVar6 = CBaseCombatCharacter::GetActiveWeapon(local_24);
if (iVar6 != 0) {
piVar4 = (int *)CBaseCombatCharacter::GetActiveWeapon(local_24);
(**(code **)(*piVar4 + 0x4e0))(piVar4);
}
}
goto LAB_0046ea11;
}
}
else {
(**(code **)(*(int *)this + 0x140))(this,param_2);
if (pCVar3 != (CBaseCombatCharacter *)0x0) {
uVar7 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(pCVar3 + 0x30));
goto LAB_0046ea11;
}
}
uVar7 = 0;
LAB_0046ea11:
piVar4 = (int *)(**(code **)(*gameeventmanager + 0x1c))(gameeventmanager,"player_death",0,0);
if (piVar4 != (int *)0x0) {
pcVar2 = *(code **)(*piVar4 + 0x30);
uVar5 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(param_1 + 0x30));
(*pcVar2)(piVar4,"userid",uVar5);
(**(code **)(*piVar4 + 0x30))(piVar4,"attacker",uVar7);
(**(code **)(*piVar4 + 0x30))(piVar4,"customkill",*(undefined4 *)(param_2 + 0x4c));
(**(code **)(*piVar4 + 0x30))(piVar4,"priority",7);
/* WARNING: Could not recover jumptable at 0x0046ead4. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*gameeventmanager + 0x20))();
return;
}
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.