- update of console code.

Backports con_pulsetext and toggle messages for CVARs from Raze.
This commit is contained in:
Christoph Oelckers 2020-09-27 09:35:06 +02:00
commit 700304bf46
10 changed files with 44 additions and 7 deletions

View file

@ -1519,7 +1519,12 @@ CCMD (toggle)
val = var->GetGenericRep (CVAR_Bool);
val.Bool = !val.Bool;
var->SetGenericRep (val, CVAR_Bool);
Printf ("\"%s\" = \"%s\"\n", var->GetName(),
auto msg = var->GetToggleMessage(val.Bool);
if (msg.IsNotEmpty())
{
Printf(PRINT_NOTIFY, "%s\n", msg.GetChars());
}
else Printf ("\"%s\" = \"%s\"\n", var->GetName(),
val.Bool ? "true" : "false");
}
}