mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 23:32:04 +00:00
- Added the mapinfo flag ForgetState. This prevents a maps state from being remembered in a hub,
so when you return to it without leaving the hub, it will be as if you had never set foot in it. RememberState is provided to turn this flag off. SVN r3846 (trunk)
This commit is contained in:
parent
69fc0142eb
commit
c954fb5477
3 changed files with 11 additions and 1 deletions
|
@ -737,9 +737,16 @@ void G_DoCompleted (void)
|
|||
|
||||
if (mode == FINISH_SameHub)
|
||||
{ // Remember the level's state for re-entry.
|
||||
if (!(level.flags2 & LEVEL2_FORGETSTATE))
|
||||
{
|
||||
G_SnapshotLevel ();
|
||||
}
|
||||
else
|
||||
{ // Make sure we don't have a snapshot lying around from before.
|
||||
level.info->ClearSnapshot();
|
||||
}
|
||||
}
|
||||
else
|
||||
{ // Forget the states of all existing levels.
|
||||
G_ClearSnapshots ();
|
||||
|
||||
|
|
|
@ -213,6 +213,7 @@ enum ELevelFlags
|
|||
LEVEL2_NOSTATISTICS = 0x10000000, // This level should not have statistics collected
|
||||
LEVEL2_ENDGAME = 0x20000000, // This is an epilogue level that cannot be quit.
|
||||
LEVEL2_NOAUTOSAVEHINT = 0x40000000, // tell the game that an autosave for this level does not need to be kept
|
||||
LEVEL2_FORGETSTATE = 0x80000000, // forget this map's state in a hub
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -1264,6 +1264,8 @@ MapFlagHandlers[] =
|
|||
{ "endofgame", MITYPE_SETFLAG2, LEVEL2_ENDGAME, 0 },
|
||||
{ "nostatistics", MITYPE_SETFLAG2, LEVEL2_NOSTATISTICS, 0 },
|
||||
{ "noautosavehint", MITYPE_SETFLAG2, LEVEL2_NOAUTOSAVEHINT, 0 },
|
||||
{ "forgetstate", MITYPE_SETFLAG2, LEVEL2_FORGETSTATE, 0 },
|
||||
{ "rememberstate", MITYPE_CLRFLAG2, LEVEL2_FORGETSTATE, 0 },
|
||||
{ "unfreezesingleplayerconversations",MITYPE_SETFLAG2, LEVEL2_CONV_SINGLE_UNFREEZE, 0 },
|
||||
{ "nobotnodes", MITYPE_IGNORE, 0, 0 }, // Skulltag option: nobotnodes
|
||||
{ "compat_shorttex", MITYPE_COMPATFLAG, COMPATF_SHORTTEX, 0 },
|
||||
|
|
Loading…
Reference in a new issue