Fixed an issue that allowed to open Hexen format maps with a Doom format game configuration when using the "Open Map in Current WAD..:" feature.

This commit is contained in:
biwa 2022-07-03 15:22:33 +02:00
parent cdce5c0a8b
commit cb12c83877

View file

@ -111,7 +111,15 @@ namespace CodeImp.DoomBuilder.Windows
{
// Count the lump when it is marked as required
string lumpname = wadfile.Lumps[scanindex + checkoffset].Name;
if(ci.Configuration.ReadSetting("maplumpnames." + lumpname + ".required", false))
// Lump cannot be present in current map format, fail this check
if (ci.Configuration.ReadSetting("maplumpnames." + lumpname + ".forbidden", false))
{
lumpsfound = -1;
break;
}
if (ci.Configuration.ReadSetting("maplumpnames." + lumpname + ".required", false))
lumpsfound++;
// Check the next lump