engine: use BaseCmd_FindAll when looking for cvars and cmds simultaneously

This commit is contained in:
Alibek Omarov
2026-02-20 21:56:59 +05:00
parent e0f01ddae7
commit 19dfec5f52
3 changed files with 23 additions and 10 deletions
+8 -1
View File
@@ -21,6 +21,7 @@ GNU General Public License for more details.
#include "shake.h"
#include "hltv.h"
#include "input.h"
#include "base_cmd.h"
enum {
STAT_HEALTH = 0,
@@ -866,7 +867,13 @@ static void CL_QuakeExecStuff( void )
if( argc == 0 )
{
// debug: find all missed commands and cvars to add them into QWrap
if( !Cvar_Exists( token ) && !Cmd_Exists( token ))
cmdalias_t *alias;
cmd_t *cmd;
convar_t *cvar;
BaseCmd_FindAll( token, &cmd, &alias, &cvar );
if( !cvar && !cmd )
Con_Printf( S_WARN "'%s' is not exist\n", token );
// else Msg( "cmd: %s\n", token );