mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 04:22:34 +00:00
Add MAPINFO NoAutoSaveOnEnter - this fully disables autosaves when a map is just entered (ignoring the user's autosave preference).
This commit is contained in:
parent
e5a4ed55f3
commit
693ed25414
4 changed files with 9 additions and 0 deletions
|
@ -1521,6 +1521,12 @@ void FLevelLocals::DoLoadLevel(const FString &nextmapname, int position, bool au
|
|||
DoDeferedScripts (); // [RH] Do script actions that were triggered on another map.
|
||||
|
||||
|
||||
// [Nash] allow modder control of autosaving
|
||||
if (flags9 & LEVEL9_NOAUTOSAVEONENTER)
|
||||
{
|
||||
autosave = false;
|
||||
}
|
||||
|
||||
// [RH] Always save the game when entering a new
|
||||
if (autosave && !savegamerestore && disableautosave < 1)
|
||||
{
|
||||
|
|
|
@ -1798,6 +1798,7 @@ MapFlagHandlers[] =
|
|||
{ "forceworldpanning", MITYPE_SETFLAG3, LEVEL3_FORCEWORLDPANNING, 0 },
|
||||
{ "nousersave", MITYPE_SETFLAG9, LEVEL9_NOUSERSAVE, 0 },
|
||||
{ "noautomap", MITYPE_SETFLAG9, LEVEL9_NOAUTOMAP, 0 },
|
||||
{ "noautosaveonenter", MITYPE_SETFLAG9, LEVEL9_NOAUTOSAVEONENTER, 0 },
|
||||
{ "propermonsterfallingdamage", MITYPE_SETFLAG3, LEVEL3_PROPERMONSTERFALLINGDAMAGE, 0 },
|
||||
{ "disableshadowmap", MITYPE_SETFLAG3, LEVEL3_NOSHADOWMAP, 0 },
|
||||
{ "enableshadowmap", MITYPE_CLRFLAG3, LEVEL3_NOSHADOWMAP, 0 },
|
||||
|
|
|
@ -274,6 +274,7 @@ enum ELevelFlags : unsigned int
|
|||
// Deliberately skip ahead...
|
||||
LEVEL9_NOUSERSAVE = 0x00000001,
|
||||
LEVEL9_NOAUTOMAP = 0x00000002,
|
||||
LEVEL9_NOAUTOSAVEONENTER = 0x00000004, // don't make an autosave when entering a map
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1389,6 +1389,7 @@ enum ELevelFlags
|
|||
|
||||
LEVEL9_NOUSERSAVE = 0x00000001,
|
||||
LEVEL9_NOAUTOMAP = 0x00000002,
|
||||
LEVEL9_NOAUTOSAVEONENTER = 0x00000004, // don't make an autosave when entering a map
|
||||
};
|
||||
|
||||
// [RH] Compatibility flags.
|
||||
|
|
Loading…
Reference in a new issue