cvarlist/cmdlist print 'h' when more help is available

This commit is contained in:
myT 2017-11-13 01:54:33 +01:00
parent d56efd2d3d
commit f36f363020
2 changed files with 3 additions and 2 deletions

View file

@ -753,7 +753,8 @@ static void Cmd_List_f()
for (const cmd_function_t* cmd = cmd_functions; cmd; cmd = cmd->next) {
if (match && !Com_Filter(match, cmd->name))
continue;
Com_Printf( "%s\n", cmd->name );
const char h = cmd->help != NULL ? 'h' : ' ';
Com_Printf( " %c %s\n", h, cmd->name );
++i;
}

View file

@ -800,7 +800,7 @@ static void Cvar_List_f( void )
Com_Printf( (var->flags & CVAR_ARCHIVE) ? "A" : " " );
Com_Printf( (var->flags & CVAR_LATCH) ? "L" : " " );
Com_Printf( (var->flags & CVAR_CHEAT) ? "C" : " " );
Com_Printf( (var->flags & CVAR_USER_CREATED) ? "?" : " " );
Com_Printf( (var->flags & CVAR_USER_CREATED) ? "?" : (var->help ? "h" : " ") );
Com_Printf(" %s \"%s\"\n", var->name, var->string);
}