2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-29 08:05:50 +03:00

cvarlist: Do correct output of string valued cvars

This commit is contained in:
WPMGPRoSToTeMa 2015-05-22 02:17:58 +03:00
parent 31bfe3db78
commit fb3504c9b6

View File

@ -526,7 +526,10 @@ void Cmd_CvarListPrintCvar(cvar_t *var, FileHandle_t f)
{
char szOutstr[256];
// TODO: Do correct output of string valued cvars
#ifdef REHLDS_FIXES
// Do correct output of string valued cvars
Q_snprintf(szOutstr, ARRAYSIZE(szOutstr) - 1, "%-28s : %16s", var->name, var->string);
#else // REHLDS_FIXES
if (var->value == (float)(int)var->value)
{
Q_snprintf(szOutstr, ARRAYSIZE(szOutstr) - 1, "%-15s : %8i", var->name, (int)var->value);
@ -535,6 +538,7 @@ void Cmd_CvarListPrintCvar(cvar_t *var, FileHandle_t f)
{
Q_snprintf(szOutstr, ARRAYSIZE(szOutstr) - 1, "%-15s : %8.3f", var->name, var->value);
}
#endif // REHLDS_FIXES
szOutstr[ARRAYSIZE(szOutstr) - 1] = 0;
if (var->flags & FCVAR_ARCHIVE)