CL4DGameStats::AddStuckStats
0x008dfaa0 · 344 bytes · __thiscall
_ZN13CL4DGameStats13AddStuckStatsEv
Decompiled
undefined (1 param)
/* CL4DGameStats::AddStuckStats() */
void __thiscall CL4DGameStats::AddStuckStats(CL4DGameStats *this)
{
char *pcVar1;
int iVar2;
KeyValues *in_stack_ffffffc8;
int local_20;
local_20 = 0;
if (0 < *(int *)(this + 0x4bc)) {
do {
in_stack_ffffffc8 = KeyValues::operator_new((KeyValues *)0x2c,(uint)in_stack_ffffffc8);
/* try { // try from 008dfaf1 to 008dfaf5 has its CatchHandler @ 008dfbf8 */
KeyValues::KeyValues(in_stack_ffffffc8,"L4D2Stuck",(IKeyValuesSystem *)0x0,false);
iVar2 = local_20 * 0x10;
KeyValues::SetInt(in_stack_ffffffc8,"XCoord",(int)*(float *)(*(int *)(this + 0x4b0) + iVar2));
KeyValues::SetInt(in_stack_ffffffc8,"YCoord",
(int)*(float *)(*(int *)(this + 0x4b0) + 4 + iVar2));
KeyValues::SetInt(in_stack_ffffffc8,"ZCoord",
(int)*(float *)(*(int *)(this + 0x4b0) + 8 + iVar2));
KeyValues::SetInt(in_stack_ffffffc8,"Type",*(int *)(*(int *)(this + 0x4b0) + 0xc + iVar2));
pcVar1 = *(char **)(gpGlobals + 0x3c);
if (pcVar1 == (char *)0x0) {
pcVar1 = "";
}
KeyValues::SetString(in_stack_ffffffc8,"MapID",pcVar1);
iVar2 = CSteamWorksGameStatsUploader::GetTimeSinceEpoch();
KeyValues::SetInt(in_stack_ffffffc8,"TimeSubmitted",iVar2);
CSteamWorksGameStatsUploader::AddStatsForUpload(steamGameStats,in_stack_ffffffc8);
local_20 = local_20 + 1;
} while (local_20 < *(int *)(this + 0x4bc));
}
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.