From 8b91bf9b61ab18b8f5748708746911b41cf59f34 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 4 Jun 2020 08:04:51 +0200 Subject: [PATCH] - enabled CVAR descriptions. --- src/common/console/c_cvars.h | 2 +- src/common/console/c_dispatch.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/console/c_cvars.h b/src/common/console/c_cvars.h index 1b3ac6fa9..d1b0e6506 100644 --- a/src/common/console/c_cvars.h +++ b/src/common/console/c_cvars.h @@ -171,7 +171,7 @@ public: static void ListVars (const char *filter, bool plain); - const char *GetDescription() const { return Description; }; + const FString &GetDescription() const { return Description; }; protected: virtual void DoSet (UCVarValue value, ECVarType type) = 0; diff --git a/src/common/console/c_dispatch.cpp b/src/common/console/c_dispatch.cpp index 03f3ebd46..6b4680e35 100644 --- a/src/common/console/c_dispatch.cpp +++ b/src/common/console/c_dispatch.cpp @@ -300,6 +300,7 @@ void C_DoCommand (const char *cmd, int keynum) } else { // Get the variable's value + if (var->GetDescription().Len()) Printf("%s\n", var->GetDescription().GetChars()); Printf ("\"%s\" is \"%s\"\n", var->GetName(), var->GetHumanString()); } }