CCvarUtilities::ResetConVarsToDefaultValues
0x00128b10 · 151 bytes · __thiscall
_ZN14CCvarUtilities27ResetConVarsToDefaultValuesEPKc
Decompiled
undefined (2 params)
/* CCvarUtilities::ResetConVarsToDefaultValues(char const*) */
void __thiscall CCvarUtilities::ResetConVarsToDefaultValues(CCvarUtilities *this,char *param_1)
{
char cVar1;
int *piVar2;
ConVar *this_00;
size_t __n;
void *__s2;
int iVar3;
piVar2 = (int *)(**(code **)(*g_pCVar + 0x98))(g_pCVar);
/* try { // try from 00128b33 to 00128b99 has its CatchHandler @ 00128baf */
(**(code **)(*piVar2 + 8))(piVar2);
do {
cVar1 = (**(code **)(*piVar2 + 0x10))(piVar2);
if (cVar1 == '\0') {
/* WARNING: Could not recover jumptable at 0x00128bad. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*piVar2 + 4))();
return;
}
this_00 = (ConVar *)(**(code **)(*piVar2 + 0x14))(piVar2);
cVar1 = (**(code **)(*(int *)this_00 + 8))(this_00);
if (cVar1 == '\0') {
if (param_1 != (char *)0x0) {
__n = strlen(param_1);
__s2 = (void *)(**(code **)(*(int *)this_00 + 0x1c))(this_00);
iVar3 = memcmp(param_1,__s2,__n);
if (iVar3 != 0) goto LAB_00128b8a;
}
ConVar::Revert(this_00);
}
LAB_00128b8a:
(**(code **)(*piVar2 + 0xc))(piVar2);
} while( true );
}
SourceMod gamedata
paste intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.