L L4D2node

CGameRules::RefreshSkillData

0x0045ed60 · 257 bytes · __thiscall

_ZN10CGameRules16RefreshSkillDataEb

Decompiled

undefined (2 params)

/* CGameRules::RefreshSkillData(bool) */

void __thiscall CGameRules::RefreshSkillData(CGameRules *this,bool param_1)

{
  code *pcVar1;
  char cVar2;
  undefined1 *puVar3;
  int iVar4;
  undefined4 uVar5;
  int in_GS_OFFSET;
  ConVarRef local_128 [4];
  int local_124;
  char local_120 [256];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if ((param_1) || (iVar4 = GlobalEntity_GetIndex("skill.cfg"), iVar4 < 0)) {
    puVar3 = &DAT_00d539c2;
    if (*(undefined1 **)(gpGlobals + 0x3c) != (undefined1 *)0x0) {
      puVar3 = *(undefined1 **)(gpGlobals + 0x3c);
    }
    GlobalEntity_Add("skill.cfg",puVar3,1);
    ConVarRef::ConVarRef(local_128,"skill");
    pcVar1 = *(code **)(*(int *)this + 0xc4);
    cVar2 = ConVarRef::IsValid(local_128);
    uVar5 = 1;
    if (cVar2 != '\0') {
      uVar5 = *(undefined4 *)(local_124 + 0x30);
    }
    (*pcVar1)(this,uVar5);
    uVar5 = (**(code **)(*(int *)this + 0xbc))(this);
    V_snprintf(local_120,0x100,"exec skill%d.cfg\n",uVar5);
    (**(code **)(*engine + 0x94))(engine,local_120);
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  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)