OT, check at Cvar_DirectSet() function.
It does the following depending on cvar flags:
PHP Code:
Log_Printf("Server cvar \"%s\" = \"%s\"\n", *(_DWORD *)a2);
SV_BroadcastPrintf("\"%s\" changed to \"%s\"\n", *(_DWORD *)a2);
Here's the code:
PHP Code:
void __usercall Cvar_DirectSet(long double a1<st0>, int a2, char *a3)
{
char *v3; // edi@1
char *v4; // ecx@4
char *v5; // esi@4
int v6; // esi@11
int v7; // ST24_4@13
int v8; // eax@13
char v9; // al@13
int v10; // eax@14
char *v11; // edx@20
int v12; // eax@20
int v13; // eax@24
int v14; // eax@24
char v15; // [sp+10h] [bp-40Ch]@4
v3 = a3;
if ( a2 )
{
if ( a3 )
{
if ( *(_BYTE *)(a2 + 8) < 0 )
{
v15 = 0;
v4 = a3;
v5 = &v15;
v3 = &v15;
while ( *v4 )
{
if ( (unsigned __int8)(*v4 - 32) <= 0x5Eu )
*v5++ = *v4++;
else
++v4;
}
*v5 = 0;
if ( !Q_strlen(&v15) )
Q_strcpy(&v15, "empty");
}
v6 = Q_strcmp(*(_DWORD *)(a2 + 4), v3);
if ( *(_BYTE *)(a2 + 8) & 2 )
{
if ( !*(_DWORD *)cls )
{
v7 = *(_DWORD *)a2;
v8 = Info_Serverinfo();
Info_SetValueForKey(v8, v7, v3, 512);
v9 = Info_Serverinfo();
SV_BroadcastCommand("fullserverinfo \"%s\"\n", v9);
}
}
v10 = *(_DWORD *)(a2 + 8);
if ( v10 & 4 )
{
if ( v6 )
{
if ( !(BYTE1(v10) & 1) )
{
Log_Printf("Server cvar \"%s\" = \"%s\"\n", *(_DWORD *)a2);
SV_BroadcastPrintf("\"%s\" changed to \"%s\"\n", *(_DWORD *)a2);
}
if ( *(_BYTE *)(a2 + 8) & 0x20 )
{
if ( Q_strlen(v3) <= 0 || (v12 = Q_stricmp(v3, "none"), v11 = (char *)&off_A7F80, !v12) )
v11 = (char *)&off_A7F80 + 2;
}
else
{
v11 = v3;
}
Steam_SetCVar(*(_DWORD *)a2, v11);
}
}
Z_Free(*(_DWORD *)(a2 + 4));
v13 = Q_strlen(v3);
v14 = Z_Malloc(v13 + 1);
*(_DWORD *)(a2 + 4) = v14;
Q_strcpy(v14, v3);
Q_atof(*(_DWORD *)(a2 + 4));
*(float *)(a2 + 12) = a1;
}
}
}
__________________