==============================================================================
*/
+extern qboolean host_init;
+
/*
===============
Cmd_StuffCmds_f
// this is for all commandline options combined (and is bounds checked)
char build[MAX_INPUTLINE];
+ // come back later so we don't crash
+ if(host_init)
+ return;
+
if (Cmd_Argc (cmd) != 1)
{
Con_Print("stuffcmds : execute command line parameters\n");
int count;
qboolean ispattern;
char vabuf[1024];
+ char *cvar_name;
if (Cmd_Argc(cmd) > 1)
partial = Cmd_Args(cmd);
count = 0;
for (cvar = cmd->cvars->vars; cvar; cvar = cvar->next)
{
- if (!matchpattern_with_separator(cvar->name, partial, true, "", false))
- if (!matchpattern_with_separator(cvar->description, partial, true, "", false))
+ if (!matchpattern_with_separator(cvar->name, partial, true, "", false) &&
+ !matchpattern_with_separator(cvar->description, partial, true, "", false))
+ {
+ for (int i = 0; i < cvar->aliasindex; i++)
+ {
+ if (!matchpattern_with_separator(cvar->aliases[i], partial, true, "", false)) {
+ continue;
+ } else {
+ cvar_name = cvar->aliases[i];
+ goto print;
+ }
+ }
continue;
- Con_Printf ("cvar ^3%s^7 is \"%s\" [\"%s\"] %s\n", cvar->name, cvar->string, cvar->defstring, cvar->description);
- count++;
+ } else {
+ cvar_name = (char *)cvar->name;
+print:
+ Con_Printf ("cvar ");
+ Cvar_PrintHelp(cvar, cvar_name, true);
+ count++;
+ }
}
for (func = cmd->userdefined->csqc_functions; func; func = func->next)
{