mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-11 14:42:05 +08:00
engine: use BaseCmd_FindAll when looking for cvars and cmds simultaneously
This commit is contained in:
@@ -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 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user