From ba58cb045fc20cad5f94c9fcb687aa1bc1a419b4 Mon Sep 17 00:00:00 2001 From: Vincent Herbet Date: Mon, 7 Aug 2017 23:42:41 +0200 Subject: [PATCH] Adjust 'amxx cvars' command output (#453) --- amxmodx/CvarManager.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/amxmodx/CvarManager.cpp b/amxmodx/CvarManager.cpp index 88b447a0..65e757d2 100644 --- a/amxmodx/CvarManager.cpp +++ b/amxmodx/CvarManager.cpp @@ -529,7 +529,7 @@ void CvarManager::OnConsoleCommand() if (!indexToSearch) { print_srvconsole("\nManaged cvars:\n"); - print_srvconsole(" %-24.23s %-24.23s %-18.17s %-8.7s %-8.7s %-8.7s\n", "NAME", "VALUE", "PLUGIN", "BOUND", "HOOKED", "BOUNDED"); + print_srvconsole(" %-24.23s %-24.23s %-18.17s %-8.7s %-8.7s %-8.7s\n", "NAME", "VALUE", "PLUGIN", "HOOKED", "MIN", "MAX"); print_srvconsole(" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \n"); } @@ -544,11 +544,13 @@ void CvarManager::OnConsoleCommand() { if (!indexToSearch) { - print_srvconsole(" [%3d] %-24.23s %-24.23s %-18.17s %-8.7s %-8.7s %-8.7s\n", ++index, ci->name.chars(), ci->var->string, + print_srvconsole(" [%3d] %-24.23s %-24.23s %-18.17s %-8.7s ", ++index, ci->name.chars(), ci->var->string, ci->plugin.length() ? ci->plugin.chars() : "-", - ci->binds.empty() ? "no" : "yes", - ci->hooks.empty() ? "no" : "yes", - ci->bound.hasMin || ci->bound.hasMax ? "yes" : "no"); + ci->hooks.empty() ? "no" : "yes"); + + (ci->bound.hasMin) ? print_srvconsole("%-8.2f ", ci->bound.minVal) : print_srvconsole("%-8.7s ", "-"); + (ci->bound.hasMax) ? print_srvconsole("%-8.2f ", ci->bound.maxVal) : print_srvconsole("%-8.7s ", "-"); + print_srvconsole("\n"); } else {