- fixed: Changed IWAD_FILENUM to a dynamic lookup.

This commit is contained in:
Rachael Alexanderson 2017-09-13 04:19:03 -04:00
commit 765646ee1c
13 changed files with 30 additions and 25 deletions

View file

@ -2431,12 +2431,12 @@ int D_LoadDehLumps(DehLumpSource source)
{
const int filenum = Wads.GetLumpFile(lumpnum);
if (FromIWAD == source && filenum > FWadCollection::IWAD_FILENUM)
if (FromIWAD == source && filenum > Wads.GetIwadNum())
{
// No more DEHACKED lumps in IWAD
break;
}
else if (FromPWADs == source && filenum <= FWadCollection::IWAD_FILENUM)
else if (FromPWADs == source && filenum <= Wads.GetIwadNum())
{
// Skip DEHACKED lumps from IWAD
continue;