- Serialize Level.nousersave and Level.noautomap properly

- Also allow them to be settable directly in a map's MAPINFO block (NoUserSave and NoAutoMap respectively)

# Conflicts:
#	src/p_saveg.cpp
This commit is contained in:
nashmuhandes 2023-07-15 20:25:20 +08:00 committed by Christoph Oelckers
parent ed2f01ac9a
commit e5a4ed55f3
6 changed files with 9 additions and 0 deletions

View file

@ -1801,6 +1801,7 @@ void FLevelLocals::Init()
flags = 0;
flags2 = 0;
flags3 = 0;
flags9 = 0;
ImpactDecalCount = 0;
frozenstate = 0;
@ -1849,6 +1850,7 @@ void FLevelLocals::Init()
flags |= info->flags;
flags2 |= info->flags2;
flags3 |= info->flags3;
flags9 |= info->flags9;
levelnum = info->levelnum;
Music = info->Music;
musicorder = info->musicorder;

View file

@ -250,6 +250,7 @@ void level_info_t::Reset()
else
flags2 = LEVEL2_LAXMONSTERACTIVATION;
flags3 = 0;
flags9 = 0;
Music = "";
LevelName = "";
AuthorName = "";

View file

@ -970,6 +970,7 @@ void FLevelLocals::Serialize(FSerializer &arc, bool hubload)
arc("flags", flags)
("flags2", flags2)
("flags3", flags3)
("flags9", flags9)
("fadeto", fadeto)
("found_secrets", found_secrets)
("found_items", found_items)

View file

@ -2763,6 +2763,7 @@ DEFINE_FIELD_X(LevelInfo, level_info_t, sucktime)
DEFINE_FIELD_X(LevelInfo, level_info_t, flags)
DEFINE_FIELD_X(LevelInfo, level_info_t, flags2)
DEFINE_FIELD_X(LevelInfo, level_info_t, flags3)
DEFINE_FIELD_X(LevelInfo, level_info_t, flags9)
DEFINE_FIELD_X(LevelInfo, level_info_t, Music)
DEFINE_FIELD_X(LevelInfo, level_info_t, LevelName)
DEFINE_FIELD_X(LevelInfo, level_info_t, AuthorName)

View file

@ -1386,6 +1386,9 @@ enum ELevelFlags
LEVEL3_AVOIDMELEE = 0x00020000, // global flag needed for proper MBF support.
LEVEL3_NOJUMPDOWN = 0x00040000, // only for MBF21. Inverse of MBF's dog_jumping flag.
LEVEL3_LIGHTCREATED = 0x00080000, // a light had been created in the last frame
LEVEL9_NOUSERSAVE = 0x00000001,
LEVEL9_NOAUTOMAP = 0x00000002,
};
// [RH] Compatibility flags.

View file

@ -337,6 +337,7 @@ struct LevelInfo native
native readonly int flags;
native readonly int flags2;
native readonly int flags3;
native readonly int flags9;
native readonly String Music;
native readonly String LevelName;
native readonly String AuthorName;