CCommentarySystem::ConvarChanged
0x0064d820 · 402 bytes · __cdecl
_ZN17CCommentarySystem13ConvarChangedEP7IConVarPKcf
Decompiled
undefined (3 params)
/* CCommentarySystem::ConvarChanged(IConVar*, char const*, float) */
void CCommentarySystem::ConvarChanged(IConVar *param_1,char *param_2,float param_3)
{
int iVar1;
char *pcVar2;
undefined4 *puVar3;
int iVar4;
int iVar5;
int in_GS_OFFSET;
byte bVar6;
int *local_1a8;
int local_1a4;
char local_1a0 [128];
char local_120 [128];
char local_a0 [128];
int local_20;
bVar6 = 0;
iVar5 = 0;
iVar4 = 0;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
ConVarRef::ConVarRef((ConVarRef *)&local_1a8,(IConVar *)param_2);
if (0 < *(int *)(param_1 + 0x3c)) {
do {
iVar1 = *(int *)(param_1 + 0x30);
pcVar2 = (char *)(**(code **)(*local_1a8 + 0x10))(local_1a8);
iVar1 = V_strncmp(pcVar2,(char *)(iVar1 + iVar4),0x80);
if (iVar1 == 0) {
V_strncpy((char *)(iVar4 + *(int *)(param_1 + 0x30) + 0x80),*(char **)(local_1a4 + 0x24),
0x80);
goto LAB_0064d8d8;
}
iVar5 = iVar5 + 1;
iVar4 = iVar4 + 0x180;
} while (iVar5 < *(int *)(param_1 + 0x3c));
}
pcVar2 = (char *)(**(code **)(*local_1a8 + 0x10))(local_1a8);
V_strncpy(local_1a0,pcVar2,0x80);
V_strncpy(local_120,*(char **)(local_1a4 + 0x24),0x80);
V_strncpy(local_a0,(char *)param_3,0x80);
iVar4 = *(int *)(param_1 + 0x3c);
CUtlVector<modifiedconvars_t,CUtlMemory<modifiedconvars_t,int>>::GrowVector
((CUtlVector<modifiedconvars_t,CUtlMemory<modifiedconvars_t,int>> *)(param_1 + 0x30),1);
CUtlVector<modifiedconvars_t,CUtlMemory<modifiedconvars_t,int>>::ShiftElementsRight
((CUtlVector<modifiedconvars_t,CUtlMemory<modifiedconvars_t,int>> *)(param_1 + 0x30),
iVar4,1);
puVar3 = (undefined4 *)(iVar4 * 0x180 + *(int *)(param_1 + 0x30));
if (puVar3 != (undefined4 *)0x0) {
pcVar2 = local_1a0;
for (iVar4 = 0x60; iVar4 != 0; iVar4 = iVar4 + -1) {
*puVar3 = *(undefined4 *)pcVar2;
pcVar2 = pcVar2 + (uint)bVar6 * -8 + 4;
puVar3 = puVar3 + (uint)bVar6 * -2 + 1;
}
}
LAB_0064d8d8:
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.