L L4D2node

CBaseGameStats_Driver::ResetData

0x004625b0 · 272 bytes · __thiscall

_ZN21CBaseGameStats_Driver9ResetDataEv

Decompiled

undefined (1 param)

/* CBaseGameStats_Driver::ResetData() */

void __thiscall CBaseGameStats_Driver::ResetData(CBaseGameStats_Driver *this)

{
  int *piVar1;
  int iVar2;
  undefined4 *puVar3;
  KeyValues *pKVar4;
  uint in_stack_ffffffd8;
  
  iVar2 = (**(code **)(*engine + 0x208))(engine);
  if (iVar2 != 0) {
    return;
  }
  piVar1 = *(int **)(this + 0x1384);
  if (piVar1 != (int *)0x0) {
    if (*piVar1 != 0) {
      KeyValues::deleteThis();
      *piVar1 = 0;
    }
    operator_delete(piVar1);
    *(undefined4 *)(this + 0x1384) = 0;
  }
  this[0x12cc] = (CBaseGameStats_Driver)0x0;
  *(undefined4 *)(this + 0x12d0) = 0;
  this[0x12e4] = (CBaseGameStats_Driver)0x0;
  puVar3 = ::operator_new(8);
  *puVar3 = 0;
  *(undefined1 *)(puVar3 + 1) = 0;
                    /* try { // try from 00462647 to 0046264b has its CatchHandler @ 004626e2 */
  pKVar4 = KeyValues::operator_new((KeyValues *)0x2c,in_stack_ffffffd8);
                    /* try { // try from 00462669 to 0046266d has its CatchHandler @ 004626c8 */
  KeyValues::KeyValues(pKVar4,"gamestats",(IKeyValuesSystem *)0x0,false);
  *puVar3 = pKVar4;
  *(undefined4 **)(this + 0x1384) = puVar3;
  pKVar4 = (KeyValues *)*puVar3;
  KeyValues::SetInt(pKVar4,"IsPc",1);
  KeyValues::SetInt(pKVar4,"version",1);
  KeyValues::SetString(pKVar4,"srcid",&s_szPseudoUniqueID);
  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)