Added 'nocheats' CVAR (#969)

This CVAR disables all classic cheats (i.e. keyboard cheats). This prevents keypresses from being eaten due to attempting to read cheats
This commit is contained in:
3saster 2019-11-12 04:29:16 -08:00 committed by Rachael Alexanderson
parent fa3e5e34a8
commit a4b6a8f093
2 changed files with 7 additions and 1 deletions

View file

@ -300,6 +300,7 @@ static cheatseq_t SpecialCheats[] =
CVAR(Bool, allcheats, false, CVAR_ARCHIVE)
CVAR(Bool, nocheats, false, CVAR_ARCHIVE)
// Respond to keyboard input events, intercept cheats.
// [RH] Cheats eat the last keypress used to trigger them
@ -307,7 +308,11 @@ bool ST_Responder (event_t *ev)
{
bool eat = false;
if (!allcheats)
if (nocheats)
{
return false;
}
else if (!allcheats)
{
cheatseq_t *cheats;
int numcheats;

View file

@ -1187,6 +1187,7 @@ OptionMenu "MiscOptions" protected
}
Option "$MISCMNU_QUERYIWAD", "queryiwad", "OnOff"
StaticText " "
Option "$MISCMNU_NOCHEATS", "nocheats", "OnOff"
Option "$MISCMNU_ALLCHEATS", "allcheats", "OnOff"
Option "$MISCMNU_ENABLEAUTOSAVES", "disableautosave", "Autosave"
Option "$MISCMNU_SAVELOADCONFIRMATION", "saveloadconfirmation", "OnOff"