L L4D2node

CL4DGameStats::AddCompetitiveStats

0x008dfc10 · 342 bytes · __thiscall

_ZN13CL4DGameStats19AddCompetitiveStatsEv

Decompiled

undefined (1 param)

/* CL4DGameStats::AddCompetitiveStats() */

void __thiscall CL4DGameStats::AddCompetitiveStats(CL4DGameStats *this)

{
  KeyValues *this_00;
  int iVar1;
  uint in_stack_ffffffe8;
  
  this_00 = KeyValues::operator_new((KeyValues *)0x2c,in_stack_ffffffe8);
                    /* try { // try from 008dfc44 to 008dfc48 has its CatchHandler @ 008dfd66 */
  KeyValues::KeyValues(this_00,"L4D2CompetitiveStats",(IKeyValuesSystem *)0x0,false);
  KeyValues::SetInt(this_00,"GameMode",*(int *)(this + 0x4cc));
  KeyValues::SetInt(this_00,"Team1Wins",*(int *)(this + 0x4d0));
  KeyValues::SetInt(this_00,"Team2Wins",*(int *)(this + 0x4d4));
  KeyValues::SetInt(this_00,"Team1Score",*(int *)(this + 0x4d8));
  KeyValues::SetInt(this_00,"Team2Score",*(int *)(this + 0x4dc));
  KeyValues::SetInt(this_00,"TeamsTie",*(int *)(this + 0x4e0));
  KeyValues::SetInt(this_00,"XboxDedicated",*(int *)(this + 0x4e4));
  KeyValues::SetString(this_00,"MapID",(char *)(this + 0x4e8));
  iVar1 = CSteamWorksGameStatsUploader::GetTimeSinceEpoch();
  KeyValues::SetInt(this_00,"TimeSubmitted",iVar1);
  CSteamWorksGameStatsUploader::AddStatsForUpload(steamGameStats,this_00);
  *(undefined4 *)(this + 0x4d8) = 0xffffffff;
  *(undefined4 *)(this + 0x4dc) = 0xffffffff;
  return;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)