L L4D2node

RevertGameModeConvar

0x00502c70 · 119 bytes · __regparm3

_ZL20RevertGameModeConvarPKcS0_

Decompiled

undefined (2 params)

/* RevertGameModeConvar(char const*, char const*) */

void __regparm3 RevertGameModeConvar(char *param_1,char *param_2)

{
  char cVar1;
  char *pcVar2;
  undefined4 *local_24;
  int local_20;
  
  pcVar2 = (char *)StringAfterPrefix(param_2,"360_");
  if (pcVar2 == (char *)0x0) {
    pcVar2 = param_2;
  }
  ConVarRef::ConVarRef((ConVarRef *)&local_24,pcVar2);
  cVar1 = ConVarRef::IsValid((ConVarRef *)&local_24);
  if (cVar1 != '\0') {
    (**(code **)*local_24)(local_24,*(undefined4 *)(local_20 + 0x20));
    DevMsg(2,"%s reverting %s\n",param_1,pcVar2);
  }
  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)