mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 15:02:39 +00:00
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:
parent
fa3e5e34a8
commit
a4b6a8f093
2 changed files with 7 additions and 1 deletions
|
@ -300,6 +300,7 @@ static cheatseq_t SpecialCheats[] =
|
||||||
|
|
||||||
|
|
||||||
CVAR(Bool, allcheats, false, CVAR_ARCHIVE)
|
CVAR(Bool, allcheats, false, CVAR_ARCHIVE)
|
||||||
|
CVAR(Bool, nocheats, false, CVAR_ARCHIVE)
|
||||||
|
|
||||||
// Respond to keyboard input events, intercept cheats.
|
// Respond to keyboard input events, intercept cheats.
|
||||||
// [RH] Cheats eat the last keypress used to trigger them
|
// [RH] Cheats eat the last keypress used to trigger them
|
||||||
|
@ -307,7 +308,11 @@ bool ST_Responder (event_t *ev)
|
||||||
{
|
{
|
||||||
bool eat = false;
|
bool eat = false;
|
||||||
|
|
||||||
if (!allcheats)
|
if (nocheats)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if (!allcheats)
|
||||||
{
|
{
|
||||||
cheatseq_t *cheats;
|
cheatseq_t *cheats;
|
||||||
int numcheats;
|
int numcheats;
|
||||||
|
|
|
@ -1187,6 +1187,7 @@ OptionMenu "MiscOptions" protected
|
||||||
}
|
}
|
||||||
Option "$MISCMNU_QUERYIWAD", "queryiwad", "OnOff"
|
Option "$MISCMNU_QUERYIWAD", "queryiwad", "OnOff"
|
||||||
StaticText " "
|
StaticText " "
|
||||||
|
Option "$MISCMNU_NOCHEATS", "nocheats", "OnOff"
|
||||||
Option "$MISCMNU_ALLCHEATS", "allcheats", "OnOff"
|
Option "$MISCMNU_ALLCHEATS", "allcheats", "OnOff"
|
||||||
Option "$MISCMNU_ENABLEAUTOSAVES", "disableautosave", "Autosave"
|
Option "$MISCMNU_ENABLEAUTOSAVES", "disableautosave", "Autosave"
|
||||||
Option "$MISCMNU_SAVELOADCONFIRMATION", "saveloadconfirmation", "OnOff"
|
Option "$MISCMNU_SAVELOADCONFIRMATION", "saveloadconfirmation", "OnOff"
|
||||||
|
|
Loading…
Reference in a new issue