From cce5066beaf4646b9d0d3a3ca6a2a6487fc60542 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 31 Jan 2015 13:14:30 +0200 Subject: [PATCH] Improved check for skins and maps in the same WAD The corresponding warning is shown for Doom I mods too. Good example of it is Hyena TC: http://www.doomworld.com/idgames/index.php?file=levels/doom/Ports/megawads/hyena.zip Reduced chance of false positive for the mentioned warning --- src/resourcefiles/file_wad.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/resourcefiles/file_wad.cpp b/src/resourcefiles/file_wad.cpp index 384290782..55a6f5f06 100644 --- a/src/resourcefiles/file_wad.cpp +++ b/src/resourcefiles/file_wad.cpp @@ -581,9 +581,18 @@ void FWadFile::SkinHack () namespc++; } } - if (lump->Name[0] == 'M' && - lump->Name[1] == 'A' && - lump->Name[2] == 'P') + if ((lump->Name[0] == 'M' && + lump->Name[1] == 'A' && + lump->Name[2] == 'P' && + lump->Name[3] >= '0' && lump->Name[3] <= '9' && + lump->Name[4] >= '0' && lump->Name[4] <= '9' && + lump->Name[5] >= '\0') + || + (lump->Name[0] == 'E' && + lump->Name[1] >= '0' && lump->Name[1] <= '9' && + lump->Name[2] == 'M' && + lump->Name[3] >= '0' && lump->Name[3] <= '9' && + lump->Name[4] >= '\0')) { hasmap = true; }