mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +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;
|
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;
|
defaultinfo = gamedefaults;
|
||||||
HexenHack = false;
|
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 ())
|
while (sc.GetString ())
|
||||||
{
|
{
|
||||||
if (sc.Compare("include"))
|
if (sc.Compare("include"))
|
||||||
|
@ -2385,6 +2396,7 @@ static void ClearMapinfo()
|
||||||
DeinitIntermissions();
|
DeinitIntermissions();
|
||||||
primaryLevel->info = nullptr;
|
primaryLevel->info = nullptr;
|
||||||
primaryLevel->F1Pic = "";
|
primaryLevel->F1Pic = "";
|
||||||
|
ParsedLumps.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
Loading…
Reference in a new issue