CMultiplayRules::PlayerKilled
0x0046e7c0 · 362 bytes · __thiscall
_ZN15CMultiplayRules12PlayerKilledEP11CBasePlayerRK15CTakeDamageInfo
Decompiled
undefined (3 params)
/* CMultiplayRules::PlayerKilled(CBasePlayer*, CTakeDamageInfo const&) */
void __thiscall
CMultiplayRules::PlayerKilled(CMultiplayRules *this,CBasePlayer *param_1,CTakeDamageInfo *param_2)
{
uint uVar1;
char cVar2;
CBasePlayer *this_00;
int iVar3;
undefined4 uVar4;
undefined *puVar5;
undefined4 local_20;
(**(code **)(*(int *)this + 0x13c))(this,param_1,param_2);
local_20 = 0;
uVar1 = *(uint *)(param_2 + 0x30);
if (((uVar1 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) {
local_20 = *(undefined4 *)(puVar5 + 4);
}
uVar1 = *(uint *)(param_2 + 0x34);
uVar4 = 0;
if (((uVar1 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) {
uVar4 = *(undefined4 *)(puVar5 + 4);
}
this_00 = (CBasePlayer *)(**(code **)(*(int *)this + 0x228))(this,uVar4,local_20,param_1);
CBasePlayer::IncrementDeathCount(param_1,1);
FireTargets("game_playerdie",param_1,param_1,3,0);
if ((param_1 == this_00) || (this_00 == (CBasePlayer *)0x0)) {
cVar2 = (**(code **)(*(int *)this + 0x23c))(this);
if (cVar2 != '\0') {
CBasePlayer::IncrementFragCount(param_1,-1);
return;
}
}
else {
iVar3 = (**(code **)(*(int *)this + 0x134))(this,this_00,param_1);
CBasePlayer::IncrementFragCount(this_00,iVar3);
CBasePlayer::AllowImmediateDecalPainting(this_00);
FireTargets("game_playerkill",this_00,this_00,3,0);
}
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.