From 92d68d05db5340f42f7b04f97ff3f33a2196f7e8 Mon Sep 17 00:00:00 2001 From: Alexander Kromm Date: Thu, 15 Oct 2020 01:04:04 +0700 Subject: [PATCH] rename reset command to resetcvar and do not create a new CVAR --- src/common/console/c_cvars.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/common/console/c_cvars.cpp b/src/common/console/c_cvars.cpp index 73f1a7882..fe19246d4 100644 --- a/src/common/console/c_cvars.cpp +++ b/src/common/console/c_cvars.cpp @@ -1497,19 +1497,17 @@ CCMD (unset) } } -CCMD (reset) +CCMD (resetcvar) { if (argv.argc() != 2) { - Printf ("usage: reset \n"); + Printf ("usage: resetcvar \n"); } else { FBaseCVar *var = FindCVar (argv[1], NULL); - if (var == NULL) - var = new FStringCVar (argv[1], NULL, CVAR_AUTO | CVAR_UNSETTABLE | cvar_defflags); - - var->ResetToDefault(); + if (var != NULL) + var->ResetToDefault(); } }