- use CCMDs for Exhumed's input where applicable.

- made crosshair toggle consistent across games.
This commit is contained in:
Christoph Oelckers 2020-08-23 16:11:18 +02:00
parent 7fe7b9b8e0
commit 1a0e413d5c
20 changed files with 91 additions and 109 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");
}
}