- added check for multiple parsing of the same MAPINFO

Warning message is issued when such case is detected
This commit is contained in:
alexey.lysiuk 2019-08-17 11:53:29 +03:00
parent a5e10fd863
commit c95a555f5e

View file

@ -62,6 +62,8 @@ TArray<FEpisode> AllEpisodes;
extern TMap<int, FString> HexenMusic;
TArray<int> ParsedLumps(8, true);
//==========================================================================
//
//
@ -2201,6 +2203,15 @@ void FMapInfoParser::ParseMapInfo (int lump, level_info_t &gamedefaults, level_i
defaultinfo = gamedefaults;
HexenHack = false;
if (ParsedLumps.Find(lump) != ParsedLumps.Size())
{
sc.ScriptMessage("MAPINFO file is processed more that once\n");
}
else
{
ParsedLumps.Push(lump);
}
while (sc.GetString ())
{
if (sc.Compare("include"))
@ -2385,6 +2396,7 @@ static void ClearMapinfo()
DeinitIntermissions();
primaryLevel->info = nullptr;
primaryLevel->F1Pic = "";
ParsedLumps.Clear();
}
//==========================================================================