L L4D2node

CL_NameCvarChanged

0x000fcf00 · 154 bytes · __cdecl

_Z18CL_NameCvarChangedP7IConVarPKcf

Decompiled

undefined (3 params)

/* CL_NameCvarChanged(IConVar*, char const*, float) */

void CL_NameCvarChanged(IConVar *param_1,char *param_2,float param_3)

{
  int iVar1;
  ConVarRef local_14 [4];
  int local_10;
  
  if ((param_1 != (IConVar *)0x0) &&
     (iVar1 = __dynamic_cast(param_1,&IConVar::typeinfo,&CSplitScreenAddedConVar::typeinfo,0x18),
     iVar1 != 0)) {
    return;
  }
  ConVarRef::ConVarRef(local_14,param_1);
  iVar1 = _V_stricmp(*(char **)(local_10 + 0x24),*(char **)(local_10 + 0x20));
  if ((iVar1 != 0) && (iVar1 = _V_stricmp(*(char **)(local_10 + 0x24),"player"), iVar1 != 0)) {
    Sys_SetRegKeyValue("Software\\Valve\\Steam","LastGameNameUsed",*(char **)(local_10 + 0x24));
  }
  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)