From c1b4fdff83baba0d624897367a70a7b6b22df6f4 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 2 May 2021 17:42:19 +0200 Subject: [PATCH] - added a "clearall" instruction to RMAPINFO. Since, unlike GZDoom, this format is additive and uses defaults for map progression it would otherwise a bit tricky to compile new episodes without accidentally pulling in some original special features. --- source/core/g_mapinfo.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source/core/g_mapinfo.cpp b/source/core/g_mapinfo.cpp index a04d86e2787..8f25f29fbaa 100644 --- a/source/core/g_mapinfo.cpp +++ b/source/core/g_mapinfo.cpp @@ -1162,6 +1162,16 @@ void FMapInfoParser::ParseMapInfo (int lump, MapRecord &gamedefaults, MapRecord { ParseGameInfo(); } + else if (sc.Compare("clearall")) + { + // clears all map and progression related data, so that a mod can start with a clean slate. + mapList.Clear(); + volumes.Clear(); + clusters.Clear(); + globalCutscenes.DefaultMapIntro = {}; + globalCutscenes.DefaultMapOutro = {}; + globalCutscenes.DefaultGameover = {}; + } else { sc.ScriptError("%s: Unknown top level keyword", sc.String);