CTerrorGameRules::RevertSavedConvars
0x00509c60 · 158 bytes · __thiscall
_ZN16CTerrorGameRules18RevertSavedConvarsEv
Decompiled
undefined (1 param)
/* CTerrorGameRules::RevertSavedConvars() */
void __thiscall CTerrorGameRules::RevertSavedConvars(CTerrorGameRules *this)
{
char cVar1;
char *pcVar2;
int iVar3;
undefined4 *local_24;
int local_20;
iVar3 = 0;
if (0 < *(int *)(this + 0x2f4)) {
do {
while( true ) {
pcVar2 = *(char **)(*(int *)(this + 0x2e8) + iVar3 * 4);
if (pcVar2 == (char *)0x0) {
pcVar2 = "";
}
ConVarRef::ConVarRef((ConVarRef *)&local_24,pcVar2);
cVar1 = ConVarRef::IsValid((ConVarRef *)&local_24);
if (cVar1 == '\0') break;
iVar3 = iVar3 + 1;
(**(code **)*local_24)(local_24,*(undefined4 *)(local_20 + 0x20));
if (*(int *)(this + 0x2f4) <= iVar3) goto LAB_00509cd5;
}
iVar3 = iVar3 + 1;
} while (iVar3 < *(int *)(this + 0x2f4));
}
LAB_00509cd5:
*(undefined4 *)(this + 0x2f4) = 0;
CUtlMemory<string_t,int>::Purge((CUtlMemory<string_t,int> *)(this + 0x2e8));
*(undefined4 *)(this + 0x2f8) = *(undefined4 *)(this + 0x2e8);
return;
}
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.