L L4D2node

CBaseGameStats::SetSkillStatistic

0x00462bc0 · 98 bytes · __thiscall

_ZN14CBaseGameStats17SetSkillStatisticEi

Decompiled

undefined (2 params)

/* CBaseGameStats::SetSkillStatistic(int) */

void __thiscall CBaseGameStats::SetSkillStatistic(CBaseGameStats *this,int param_1)

{
  int *piVar1;
  char *pcVar2;
  int iVar3;
  int iVar4;
  
  iVar4 = 2;
  if (param_1 < 4) {
    iVar4 = 1;
    if (0 < param_1) {
      iVar4 = param_1;
    }
    iVar4 = iVar4 + -1;
  }
  if (CBGSDriver[0x130f] != '\0') {
    pcVar2 = (char *)CUtlString::Get((CUtlString *)(CBGSDriver + 0x12e8));
    iVar3 = BasicGameStats_t::FindOrAddRecordForMap((BasicGameStats_t *)(this + 4),pcVar2);
    piVar1 = (int *)(iVar3 + 0x14 + iVar4 * 4);
    *piVar1 = *piVar1 + 1;
  }
  if (CBGSDriver[0x1310] != '\0') {
    *(int *)(this + iVar4 * 4 + 0x1c) = *(int *)(this + iVar4 * 4 + 0x1c) + 1;
  }
  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)