mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 01:21:17 +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
3c030527af
commit
787f06d7f3
5 changed files with 8 additions and 1 deletions
|
@ -129,6 +129,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("=");
|
||||
|
|
|
@ -2441,6 +2441,7 @@ void D_DoomMain (void)
|
|||
const FIWADInfo *iwad_info = iwad_man->FindIWAD(allwads, iwad, basewad, optionalwad);
|
||||
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
|
||||
int flags = 0;
|
||||
|
|
1
src/gi.h
1
src/gi.h
|
@ -112,6 +112,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