mirror of
https://github.com/rehlds/rehlds.git
synced 2025-01-01 01:25:38 +03:00
cvarlist: Do correct output of string valued cvars
This commit is contained in:
parent
31bfe3db78
commit
fb3504c9b6
@ -526,7 +526,10 @@ void Cmd_CvarListPrintCvar(cvar_t *var, FileHandle_t f)
|
|||||||
{
|
{
|
||||||
char szOutstr[256];
|
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)
|
if (var->value == (float)(int)var->value)
|
||||||
{
|
{
|
||||||
Q_snprintf(szOutstr, ARRAYSIZE(szOutstr) - 1, "%-15s : %8i", var->name, (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);
|
Q_snprintf(szOutstr, ARRAYSIZE(szOutstr) - 1, "%-15s : %8.3f", var->name, var->value);
|
||||||
}
|
}
|
||||||
|
#endif // REHLDS_FIXES
|
||||||
szOutstr[ARRAYSIZE(szOutstr) - 1] = 0;
|
szOutstr[ARRAYSIZE(szOutstr) - 1] = 0;
|
||||||
|
|
||||||
if (var->flags & FCVAR_ARCHIVE)
|
if (var->flags & FCVAR_ARCHIVE)
|
||||||
|
Loading…
Reference in New Issue
Block a user