ConVar::InternalSetIntValue
0x0003e220 · 245 bytes · __thiscall
_ZN6ConVar19InternalSetIntValueEi
Decompiled
undefined (2 params)
/* ConVar::InternalSetIntValue(int) */
void __thiscall ConVar::InternalSetIntValue(ConVar *this,int param_1)
{
undefined4 uVar1;
char cVar2;
int in_GS_OFFSET;
float local_34;
char local_30 [32];
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
if (*(int *)(this + 0x30) != param_1) {
cVar2 = (**(code **)(*(int *)this + 0xc))(this,0xb00000);
if ((cVar2 != '\0') && (g_pCVar != (int *)0x0)) {
cVar2 = (**(code **)(*g_pCVar + 0x80))(g_pCVar);
if (cVar2 == '\0') {
(**(code **)(*g_pCVar + 0x88))(g_pCVar,this,param_1);
goto LAB_0003e2a6;
}
}
local_34 = (float)param_1;
cVar2 = (**(code **)(*(int *)this + 0x5c))(this,&local_34);
if (cVar2 != '\0') {
param_1 = (int)local_34;
}
*(int *)(this + 0x30) = param_1;
uVar1 = *(undefined4 *)(this + 0x2c);
*(float *)(this + 0x2c) = local_34;
if (((byte)this[0x15] & 0x10) == 0) {
V_snprintf(local_30,0x20,"%d",param_1);
(**(code **)(*(int *)this + 0x60))(this,local_30,uVar1);
}
}
LAB_0003e2a6:
if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.