When strict patches loading is off, colormaps can now also be found outside C_START and C_END when a base resource defines them correctly in between C_START and C_END (or in the Colormaps subdirectory)

This commit is contained in:
codeimp 2009-05-13 20:54:45 +00:00
parent 18dccfd87f
commit 041a4b8a57

View file

@ -276,10 +276,20 @@ namespace CodeImp.DoomBuilder.Data
// Error when suspended // Error when suspended
if(issuspended) throw new Exception("Data reader is suspended"); if(issuspended) throw new Exception("Data reader is suspended");
// Find the lump in ranges // Strictly read patches only between C_START and C_END?
foreach(LumpRange range in colormapranges) if(strictpatches)
{ {
lump = file.FindLump(pname, range.start, range.end); // Find the lump in ranges
foreach(LumpRange range in colormapranges)
{
lump = file.FindLump(pname, range.start, range.end);
if(lump != null) return lump.Stream;
}
}
else
{
// Find the lump anywhere
lump = file.FindLump(pname);
if(lump != null) return lump.Stream; if(lump != null) return lump.Stream;
} }