From caabae74d38fe8683dc1f184fff14370cf268db0 Mon Sep 17 00:00:00 2001 From: Dan Olson Date: Tue, 7 Mar 2000 22:28:25 +0000 Subject: [PATCH] Added 'cvarlist' command. --- common/cvar.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/common/cvar.c b/common/cvar.c index c3a6360..60d2686 100644 --- a/common/cvar.c +++ b/common/cvar.c @@ -42,8 +42,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. cvar_t *cvar_vars; char *cvar_null_string = ""; -extern void M_Menu_Help_f (void); - /* ============ Cvar_FindVar @@ -288,11 +286,22 @@ void Cvar_Help_f (void) } Con_Printf ("variable not found\n"); } - + +void Cvar_CvarList_f (void) +{ + cvar_t *var; + + for (var = cvar_vars; var ; var = var->next) + { + Con_Printf("%s\n",var->name); + } +} + void Cvar_Init() { Cmd_AddCommand ("set", Cvar_Set_f); Cmd_AddCommand ("help",Cvar_Help_f); + Cmd_AddCommand ("cvarlist",Cvar_CvarList_f); } void Cvar_Shutdown (void)