disable 'unfriendly' option like blocking automap or savegames via #ifdef.

Leave them in the code for modified engines but in the context of Doom using them has to be considered extremely unfriendly to the player so they should not be available physically.
This commit is contained in:
Christoph Oelckers 2023-09-17 18:37:51 +02:00
parent 0dbf988d35
commit 16ad25b382
5 changed files with 13 additions and 2 deletions

View file

@ -1547,11 +1547,13 @@ void DAutomap::Ticker ()
if (!automapactive)
return;
#ifdef UNFRIENDLY_OPTIONS
if ((primaryLevel->flags9 & LEVEL9_NOAUTOMAP))
{
AM_ToggleMap();
return;
}
#endif
amclock++;
}
@ -3455,8 +3457,10 @@ void AM_ToggleMap()
if (!primaryLevel || !primaryLevel->automap)
return;
#ifdef UNFRIENDLY_OPTIONS
if (!automapactive && (primaryLevel->flags9 & LEVEL9_NOAUTOMAP))
return;
#endif
if (!automapactive)
{

View file

@ -700,11 +700,13 @@ UNSAFE_CCMD (load)
UNSAFE_CCMD(save)
{
#ifdef UNFRIENDLY_OPTIONS
if ((primaryLevel->flags9 & LEVEL9_NOUSERSAVE))
{
Printf("%s\n", GStrings("SAVEDEAD"));
return;
}
#endif
if (argv.argc() < 2 || argv.argc() > 3 || argv[1][0] == 0)
{

View file

@ -2197,8 +2197,10 @@ CUSTOM_CVAR (Int, quicksaverotationcount, 4, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
void G_DoAutoSave ()
{
#ifdef UNFRIENDLY_OPTIONS
if ((primaryLevel->flags9 & LEVEL9_NOUSERSAVE))
return;
#endif
FString description;
FString file;

View file

@ -253,11 +253,13 @@ bool M_SetSpecialMenu(FName& menu, int param)
return false;
}
#ifdef UNFRIENDLY_OPTIONS
if ((primaryLevel->flags9 & LEVEL9_NOUSERSAVE))
{
M_StartMessage(GStrings("SAVEDEAD"), 1);
return false;
}
#endif
break;

View file

@ -472,8 +472,9 @@ struct LevelLocals native
native readonly int compatflags2;
native readonly LevelInfo info;
native bool nousersave;
native bool noautomap;
// 'unfriendly' options not accessible by default.
//native bool nousersave;
//native bool noautomap;
native String GetUDMFString(int type, int index, Name key);
native int GetUDMFInt(int type, int index, Name key);