From 176afd6d5d686a2cbbdd5ba7a62a213e31ef3b73 Mon Sep 17 00:00:00 2001 From: Spoike Date: Wed, 5 May 2021 21:59:23 +0000 Subject: [PATCH] Add resetcfg for compat with QS. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5826 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/common/cmd.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/engine/common/cmd.c b/engine/common/cmd.c index e1e475797..e7b0783b9 100644 --- a/engine/common/cmd.c +++ b/engine/common/cmd.c @@ -4082,6 +4082,12 @@ static void Cmd_WriteConfig_f(void) static void Cmd_Reset_f(void) { + //FIXME: this should reset to _engine_ defaults (with fmf overrides) + Cbuf_InsertText("cvarreset *\n", RESTRICT_LOCAL, false); + //FIXME: wipe aliases + //FIXME: reset + commands + //FIXME: destroy custom cvars (unless there's a live pointer still... which is not tracked properly, bah) +// Cbuf_InsertText("exec default.cfg\n", RESTRICT_LOCAL, false); } #ifdef HAVE_CLIENT @@ -4268,7 +4274,8 @@ void Cmd_Init (void) Cmd_AddCommandAD ("saveconfig",Cmd_WriteConfig_f, Cmd_Exec_c, NULL); //for dpcompat Cmd_AddCommandAD ("cfg_load",Cmd_Exec_f, Cmd_Exec_c, NULL); - Cmd_AddCommand ("cfg_reset",Cmd_Reset_f); + Cmd_AddCommand ("cfg_reset",Cmd_Reset_f); //ezquake + Cmd_AddCommand ("resetcfg",Cmd_Reset_f); //QS Cmd_AddCommandAD ("exec",Cmd_Exec_f, Cmd_Exec_c, NULL); Cmd_AddCommand ("echo",Cmd_Echo_f);