ConVar::InternalSetFloatValue
0x002472e0 · 257 bytes · __thiscall
_ZN6ConVar21InternalSetFloatValueEf
Decompiled
undefined (2 params)
/* ConVar::InternalSetFloatValue(float) */
void __thiscall ConVar::InternalSetFloatValue(ConVar *this,float param_1)
{
undefined4 uVar1;
char cVar2;
int in_GS_OFFSET;
char local_30 [32];
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
if (*(float *)(this + 0x2c) != 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 + 0x8c))(g_pCVar,this,param_1);
goto LAB_00247301;
}
}
(**(code **)(*(int *)this + 0x5c))(this,¶m_1);
uVar1 = *(undefined4 *)(this + 0x2c);
*(float *)(this + 0x2c) = param_1;
*(int *)(this + 0x30) = (int)param_1;
if (((byte)this[0x15] & 0x10) == 0) {
V_snprintf(local_30,0x20,"%f",(double)param_1);
(**(code **)(*(int *)this + 0x60))(this,local_30,uVar1);
}
}
LAB_00247301:
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.