mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-29 23:41:48 +00:00
- added check for multiple parsing of the same MAPINFO
Warning message is issued when such case is detected
This commit is contained in:
parent
a5e10fd863
commit
c95a555f5e
1 changed files with 12 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
Loading…
Reference in a new issue