ConVarNetworkChangeCallback
0x00128050 · 369 bytes · __cdecl
_ZL27ConVarNetworkChangeCallbackP7IConVarPKcf
Decompiled
undefined (3 params)
/* ConVarNetworkChangeCallback(IConVar*, char const*, float) */
void ConVarNetworkChangeCallback(IConVar *param_1,char *param_2,float param_3)
{
code *pcVar1;
char cVar2;
int iVar3;
ConVar *pCVar4;
int *piVar5;
undefined4 uVar6;
int *local_24;
int local_20;
ConVarRef::ConVarRef((ConVarRef *)&local_24,param_1);
if (param_2 == (char *)0x0) {
if (param_3 == *(float *)(local_20 + 0x2c)) {
return;
}
}
else {
iVar3 = _V_strcmp(*(char **)(local_20 + 0x24),param_2);
if (iVar3 == 0) {
return;
}
}
(**(code **)(*local_24 + 0x18))(local_24,0x200);
cVar2 = (**(code **)(*local_24 + 0x18))(local_24,0x100);
if ((cVar2 != '\0') &&
(piVar5 = (int *)(**(code **)(s_GameEventManager + 0x1c))
(&s_GameEventManager,"server_cvar",0,0), piVar5 != (int *)0x0)) {
pcVar1 = *(code **)(*piVar5 + 0x3c);
uVar6 = (**(code **)(*local_24 + 0x10))(local_24);
(*pcVar1)(piVar5,"cvarname",uVar6);
cVar2 = (**(code **)(*local_24 + 0x18))(local_24,0x20);
if (cVar2 == '\0') {
(**(code **)(*piVar5 + 0x3c))(piVar5,"cvarvalue",*(undefined4 *)(local_20 + 0x24));
}
else {
(**(code **)(*piVar5 + 0x3c))(piVar5,"cvarvalue","***PROTECTED***");
}
(**(code **)(s_GameEventManager + 0x20))(&s_GameEventManager,piVar5,0);
}
cVar2 = (**(code **)(*local_24 + 0x18))(local_24,0x2000);
if ((cVar2 != '\0') && (1 < DAT_003b7f64)) {
pCVar4 = (ConVar *)0x0;
if (param_1 != (IConVar *)0x0) {
pCVar4 = (ConVar *)(param_1 + -0x18);
}
SV_ReplicateConVarChange(pCVar4,*(char **)(local_20 + 0x24));
return;
}
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.