From fb3504c9b63594694dcc990f90d4ec41e2a87a49 Mon Sep 17 00:00:00 2001 From: WPMGPRoSToTeMa Date: Fri, 22 May 2015 02:17:58 +0300 Subject: [PATCH] cvarlist: Do correct output of string valued cvars --- rehlds/engine/cvar.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rehlds/engine/cvar.cpp b/rehlds/engine/cvar.cpp index e6866e7..d66f95d 100644 --- a/rehlds/engine/cvar.cpp +++ b/rehlds/engine/cvar.cpp @@ -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)