CCSPlayer::Event_Killed
0x0065e850 · 1003 bytes · __thiscall
_ZN9CCSPlayer12Event_KilledERK15CTakeDamageInfo
Decompiled
undefined (2 params)
/* CCSPlayer::Event_Killed(CTakeDamageInfo const&) */
void __thiscall CCSPlayer::Event_Killed(CCSPlayer *this,CTakeDamageInfo *param_1)
{
uint uVar1;
CBaseEdict *pCVar2;
int iVar3;
undefined4 uVar4;
undefined *puVar5;
float local_88;
float local_84;
float local_80;
undefined4 local_7c;
undefined4 local_78;
undefined4 local_74;
undefined4 local_70;
undefined4 local_6c;
undefined4 local_68;
undefined4 local_64;
undefined4 local_60;
undefined4 local_5c;
undefined4 local_58;
undefined4 local_54;
undefined4 local_50;
undefined4 local_4c;
undefined4 local_48;
undefined4 local_44;
undefined4 local_40;
undefined4 local_3c;
undefined4 local_38;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
CBasePlayer::SetArmorValue((CBasePlayer *)this,0);
(**(code **)(*(int *)this + 0x8b0))(this,1);
SetProgressBarTime(this,0.0);
if (this[0x23e0] != (CCSPlayer)0x0) {
if (this[0x6c] == (CCSPlayer)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CCSPlayer)((byte)this[0x70] | 1);
}
this[0x23e0] = (CCSPlayer)0x0;
}
if (this[0x2429] != (CCSPlayer)0x0) {
if (this[0x6c] == (CCSPlayer)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CCSPlayer)((byte)this[0x70] | 1);
}
this[0x2429] = (CCSPlayer)0x0;
}
if (this[0x242a] != (CCSPlayer)0x0) {
if (this[0x6c] == (CCSPlayer)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CCSPlayer)((byte)this[0x70] | 1);
}
this[0x242a] = (CCSPlayer)0x0;
}
if (this[0x23e1] != (CCSPlayer)0x0) {
if (this[0x6c] == (CCSPlayer)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CCSPlayer)((byte)this[0x70] | 1);
}
this[0x23e1] = (CCSPlayer)0x0;
}
if (*(float *)(this + 0x2888) != 0.0) {
if (this[0x6c] == (CCSPlayer)0x0) {
pCVar2 = *(CBaseEdict **)(this + 0x30);
if (pCVar2 != (CBaseEdict *)0x0) {
*(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
*(undefined2 *)(iVar3 + 2) = 0;
}
}
else {
this[0x70] = (CCSPlayer)((byte)this[0x70] | 1);
}
*(undefined4 *)(this + 0x2888) = 0;
}
(**(code **)(*(int *)this + 0x5fc))(this,0);
uVar4 = 0;
uVar1 = *(uint *)(param_1 + 0x34);
if (((uVar1 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) {
uVar4 = *(undefined4 *)(puVar5 + 4);
}
(**(code **)(*(int *)this + 0x64c))(this,uVar4);
local_70 = *(undefined4 *)(param_1 + 0xc);
local_40 = *(undefined4 *)(param_1 + 0x3c);
local_3c = *(undefined4 *)(param_1 + 0x40);
local_6c = *(undefined4 *)(param_1 + 0x10);
local_38 = *(undefined4 *)(param_1 + 0x44);
local_68 = *(undefined4 *)(param_1 + 0x14);
local_64 = *(undefined4 *)(param_1 + 0x18);
local_60 = *(undefined4 *)(param_1 + 0x1c);
local_5c = *(undefined4 *)(param_1 + 0x20);
local_58 = *(undefined4 *)(param_1 + 0x24);
local_54 = *(undefined4 *)(param_1 + 0x28);
local_50 = *(undefined4 *)(param_1 + 0x2c);
local_4c = *(undefined4 *)(param_1 + 0x30);
local_48 = *(undefined4 *)(param_1 + 0x34);
local_44 = *(undefined4 *)(param_1 + 0x38);
local_34 = *(undefined4 *)(param_1 + 0x48);
local_30 = *(undefined4 *)(param_1 + 0x4c);
local_2c = *(undefined4 *)(param_1 + 0x50);
local_24 = *(undefined4 *)(param_1 + 0x58);
local_7c = *(undefined4 *)(this + 0x287c);
local_28 = *(undefined4 *)(param_1 + 0x54);
local_78 = *(undefined4 *)(this + 0x2880);
local_74 = *(undefined4 *)(this + 0x2884);
local_20 = *(undefined4 *)(param_1 + 0x5c);
(**(code **)(*(int *)this + 0x890))(this,param_1);
iVar3 = CRagdollMagnet::FindBestMagnet((CBaseEntity *)this);
if (iVar3 != 0) {
CRagdollMagnet::GetForceVector((CBaseEntity *)&local_88);
*(float *)(this + 0x287c) = *(float *)(this + 0x287c) + local_88;
*(float *)(this + 0x2880) = *(float *)(this + 0x2880) + local_84;
*(float *)(this + 0x2884) = *(float *)(this + 0x2884) + local_80;
}
if ((*(int *)(param_1 + 0x48) != 0x1000) || (*(float *)(param_1 + 0x3c) != 0.0)) {
(**(code **)(*(int *)this + 0x8a0))(this,param_1);
}
State_Leave(this,4);
State_Enter(this,4);
CBasePlayer::Event_Killed((CBasePlayer *)this,(CTakeDamageInfo *)&local_7c);
(**(code **)(*g_pGameRules + 0x2a0))(g_pGameRules);
OutputDamageGiven(this);
OutputDamageTaken(this);
CUtlLinkedList<CDamageRecord*,int,false,int,CUtlMemory<UtlLinkedListElem_t<CDamageRecord*,int>,int>>
::PurgeAndDeleteElements
((CUtlLinkedList<CDamageRecord*,int,false,int,CUtlMemory<UtlLinkedListElem_t<CDamageRecord*,int>,int>>
*)(this + 0x29b8));
CUtlLinkedList<CDamageRecord*,int,false,int,CUtlMemory<UtlLinkedListElem_t<CDamageRecord*,int>,int>>
::PurgeAndDeleteElements
((CUtlLinkedList<CDamageRecord*,int,false,int,CUtlMemory<UtlLinkedListElem_t<CDamageRecord*,int>,int>>
*)(this + 0x29e0));
if (this[0x23f9] != (CCSPlayer)0x0) {
this[0x23f9] = (CCSPlayer)0x0;
}
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.