mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 05:51:20 +00:00
Added 'NoKeyboardCheats' option to IWADINFO
This is useful for IWADs that do not want to use the hardcoded engine cheats. This can still be overriden with the 'allcheats' CVAR
This commit is contained in:
parent
26dd900b3e
commit
a74be69371
5 changed files with 8 additions and 1 deletions
|
@ -128,6 +128,10 @@ void FIWadManager::ParseIWadInfo(const char *fn, const char *data, int datasize,
|
|||
sc.MustGetString();
|
||||
iwad->MapInfo = sc.String;
|
||||
}
|
||||
else if (sc.Compare("NoKeyboardCheats"))
|
||||
{
|
||||
iwad->nokeyboardcheats = true;
|
||||
}
|
||||
else if (sc.Compare("Compatibility"))
|
||||
{
|
||||
sc.MustGetStringName("=");
|
||||
|
|
|
@ -2480,6 +2480,7 @@ static int D_DoomMain_Internal (void)
|
|||
if (!iwad_info) return 0; // user exited the selection popup via cancel button.
|
||||
gameinfo.gametype = iwad_info->gametype;
|
||||
gameinfo.flags = iwad_info->flags;
|
||||
gameinfo.nokeyboardcheats = iwad_info->nokeyboardcheats;
|
||||
gameinfo.ConfigName = iwad_info->Configname;
|
||||
lastIWAD = iwad;
|
||||
|
||||
|
|
|
@ -107,6 +107,7 @@ struct FIWADInfo
|
|||
EGameType gametype = GAME_Doom; // which game are we playing?
|
||||
int StartupType = FStartupInfo::DefaultStartup; // alternate startup type
|
||||
FString MapInfo; // Base mapinfo to load
|
||||
bool nokeyboardcheats = false; // disable keyboard cheats
|
||||
TArray<FString> Load; // Wads to be loaded with this one.
|
||||
TArray<FString> Lumps; // Lump names for identification
|
||||
TArray<FString> DeleteLumps; // Lumps which must be deleted from the directory.
|
||||
|
|
|
@ -111,6 +111,7 @@ struct gameinfo_t
|
|||
FString ConfigName;
|
||||
|
||||
FString TitlePage;
|
||||
bool nokeyboardcheats;
|
||||
bool drawreadthis;
|
||||
bool noloopfinalemusic;
|
||||
bool intermissioncounter;
|
||||
|
|
|
@ -309,7 +309,7 @@ bool ST_Responder (event_t *ev)
|
|||
{
|
||||
bool eat = false;
|
||||
|
||||
if (nocheats || !!cl_blockcheats)
|
||||
if (nocheats || !!cl_blockcheats || (gameinfo.nokeyboardcheats && !allcheats))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue