mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
- added _mental_'s patch for loading .deh/.bex files if no Dehacked lump can be found.
This commit is contained in:
parent
d8abeceef9
commit
aa5f223051
1 changed files with 22 additions and 0 deletions
|
@ -2337,6 +2337,28 @@ int D_LoadDehLumps()
|
|||
{
|
||||
count += D_LoadDehLump(lumpnum);
|
||||
}
|
||||
|
||||
if (0 == PatchSize)
|
||||
{
|
||||
// No DEH/BEX patch is loaded yet, try to find lump(s) with specific extensions
|
||||
|
||||
for (lumpnum = 0, lastlump = Wads.GetNumLumps();
|
||||
lumpnum < lastlump;
|
||||
++lumpnum)
|
||||
{
|
||||
const char* const fullName = Wads.GetLumpFullName(lumpnum);
|
||||
const char* const extension = strrchr(fullName, '.');
|
||||
|
||||
const bool isDehOrBex = NULL != extension
|
||||
&& (0 == stricmp(extension, ".deh") || 0 == stricmp(extension, ".bex"));
|
||||
|
||||
if (isDehOrBex)
|
||||
{
|
||||
count += D_LoadDehLump(lumpnum);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue