CBasePlayer::CommitSuicide
0x007aa740 · 285 bytes · __thiscall
_ZN11CBasePlayer13CommitSuicideERK6Vectorbb
Decompiled
undefined (4 params)
/* CBasePlayer::CommitSuicide(Vector const&, bool, bool) */
void __thiscall
CBasePlayer::CommitSuicide(CBasePlayer *this,Vector *param_1,bool param_2,bool param_3)
{
int iVar1;
int *piVar2;
char cVar3;
undefined4 *puVar4;
undefined4 local_7c;
undefined4 local_78;
undefined4 local_74;
undefined4 local_70;
undefined4 local_6c;
undefined4 local_68;
undefined4 local_48;
float local_40;
uint local_34;
piVar2 = mdlcache;
(**(code **)(*mdlcache + 0x68))(mdlcache);
/* try { // try from 007aa76e to 007aa83c has its CatchHandler @ 007aa860 */
cVar3 = (**(code **)(*(int *)this + 300))(this);
if ((cVar3 != '\0') && ((*(float *)(this + 0x1da8) <= *(float *)(gpGlobals + 0xc) || (param_3))))
{
iVar1 = *(int *)(this + 0x100);
*(float *)(this + 0x1da8) = *(float *)(gpGlobals + 0xc) + 5.0;
CTakeDamageInfo::CTakeDamageInfo((CTakeDamageInfo *)&local_7c);
local_40 = (float)(iVar1 + 10);
puVar4 = (undefined4 *)(**(code **)(*(int *)this + 0xc))(this);
local_48 = *puVar4;
local_7c = *(undefined4 *)param_1;
local_78 = *(undefined4 *)(param_1 + 4);
local_34 = ~-(uint)!param_2 & 0x2040;
local_74 = *(undefined4 *)(param_1 + 8);
puVar4 = (undefined4 *)(**(code **)(*(int *)this + 0x288))(this);
local_70 = *puVar4;
local_6c = puVar4[1];
local_68 = puVar4[2];
CBaseEntity::TakeDamage((CBaseEntity *)this,(CTakeDamageInfo *)&local_7c);
(**(code **)(*piVar2 + 0x6c))(piVar2);
return;
}
(**(code **)(*piVar2 + 0x6c))(piVar2);
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.