Skip to content

Commit

Permalink
- added a "clearall" instruction to RMAPINFO.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
coelckers committed May 2, 2021
1 parent dfd47ea commit c1b4fdf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions source/core/g_mapinfo.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit c1b4fdf

Please sign in to comment.