CL4DGameStats::AddDeathStats
0x008df8f0 · 401 bytes · __thiscall
_ZN13CL4DGameStats13AddDeathStatsEv
Decompiled
undefined (1 param)
/* CL4DGameStats::AddDeathStats() */
void __thiscall CL4DGameStats::AddDeathStats(CL4DGameStats *this)
{
char *pcVar1;
int iVar2;
KeyValues *in_stack_ffffffc8;
int local_20;
local_20 = 0;
if (0 < *(int *)(this + 0x4a8)) {
do {
in_stack_ffffffc8 = KeyValues::operator_new((KeyValues *)0x2c,(uint)in_stack_ffffffc8);
/* try { // try from 008df941 to 008df945 has its CatchHandler @ 008dfa81 */
KeyValues::KeyValues(in_stack_ffffffc8,"Deaths",(IKeyValuesSystem *)0x0,false);
iVar2 = local_20 * 0x20;
KeyValues::SetInt(in_stack_ffffffc8,"XCoord",(int)*(float *)(*(int *)(this + 0x49c) + iVar2));
KeyValues::SetInt(in_stack_ffffffc8,"YCoord",
(int)*(float *)(*(int *)(this + 0x49c) + 4 + iVar2));
KeyValues::SetInt(in_stack_ffffffc8,"ZCoord",
(int)*(float *)(*(int *)(this + 0x49c) + 8 + iVar2));
KeyValues::SetInt(in_stack_ffffffc8,"Team",*(int *)(*(int *)(this + 0x49c) + 0xc + iVar2));
KeyValues::SetInt(in_stack_ffffffc8,"SessionTime",
*(int *)(*(int *)(this + 0x49c) + 0x1c + iVar2));
KeyValues::SetInt(in_stack_ffffffc8,"DeathCause",
*(int *)(*(int *)(this + 0x49c) + 0x10 + iVar2));
KeyValues::SetInt(in_stack_ffffffc8,"DeathParam",
*(int *)(*(int *)(this + 0x49c) + 0x18 + iVar2));
pcVar1 = *(char **)(gpGlobals + 0x3c);
if (pcVar1 == (char *)0x0) {
pcVar1 = "";
}
KeyValues::SetString(in_stack_ffffffc8,"DeathMap",pcVar1);
CSteamWorksGameStatsUploader::AddStatsForUpload(steamGameStats,in_stack_ffffffc8);
local_20 = local_20 + 1;
} while (local_20 < *(int *)(this + 0x4a8));
}
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.