L L4D2node

ConVarRef::Init

0x00b6b0f0 · 146 bytes · __thiscall

_ZN9ConVarRef4InitEPKcb

Decompiled

undefined (3 params)

/* ConVarRef::Init(char const*, bool) */

void __thiscall ConVarRef::Init(ConVarRef *this,char *param_1,bool param_2)

{
  undefined1 *puVar1;
  
  if (g_pCVar == (int *)0x0) {
    puVar1 = s_EmptyConVar;
  }
  else {
    puVar1 = (undefined1 *)(**(code **)(*g_pCVar + 0x30))(g_pCVar,param_1);
    if (puVar1 == (undefined1 *)0x0) {
      *(undefined4 *)this = 0x1045498;
      *(undefined1 **)(this + 4) = s_EmptyConVar;
      goto LAB_00b6b14d;
    }
  }
  *(undefined1 **)(this + 4) = puVar1;
  *(undefined1 **)this = puVar1 + 0x18;
  if (puVar1 + 0x18 != (undefined1 *)0x1045498) {
    return;
  }
LAB_00b6b14d:
  if ((g_pCVar == (int *)0x0) && (Init(char_const*,bool)::bFirst == '\0')) {
    return;
  }
  if (!param_2) {
    Warning("ConVarRef %s doesn\'t point to an existing ConVar\n",param_1);
  }
  Init(char_const*,bool)::bFirst = 0;
  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)