]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
cvar: reset colours after printing values, clarify virtual/alias message
authorbones_was_here <bones_was_here@xonotic.au>
Thu, 28 Sep 2023 09:04:12 +0000 (19:04 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Thu, 28 Sep 2023 09:04:12 +0000 (19:04 +1000)
Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
cvar.c

diff --git a/cvar.c b/cvar.c
index 98f11e399ba6d924f9487dadf96b266d0e470d27..e95344b5d2516d3cce7bb5e4559b9efcfde3ccba 100644 (file)
--- a/cvar.c
+++ b/cvar.c
@@ -271,15 +271,13 @@ void Cvar_PrintHelp(cvar_t *cvar, const char *name, qbool full)
 {
        // Aliases are purple, cvars are yellow
        if (strcmp(cvar->name, name))
-               Con_Printf("^6");
+               Con_Printf("^6%s^7 (alias of ^3%s^7)", name, cvar->name);
        else
-               Con_Printf("^3");
-       Con_Printf("%s^7 is \"%s\" [\"%s\"]", name, ((cvar->flags & CF_PRIVATE) ? "********"/*hunter2*/ : cvar->string), cvar->defstring);
-       if (strcmp(cvar->name, name))
-               Con_Printf(" (also ^3%s^7)", cvar->name);
+               Con_Printf("^3%s^7", name);
+       Con_Printf(" is \"%s^7\" [\"%s^7\"]", ((cvar->flags & CF_PRIVATE) ? "********"/*hunter2*/ : cvar->string), cvar->defstring);
        if (full)
                Con_Printf(" %s", cvar->description);
-       Con_Printf("\n");
+       Con_Print("\n");
 }
 
 // written by LadyHavoc