heretic: Add autoloading for .hhe patches.

Heretic uses HHE instead of .deh, which have a different extension,
although some HHE patches actually have the .deh extension.
This commit is contained in:
Simon Howard 2018-11-03 13:14:04 -04:00
parent 036484b643
commit f6717da5dd
2 changed files with 3 additions and 2 deletions

View file

@ -413,7 +413,8 @@ void DEH_AutoLoadPatches(const char *path)
const char *filename;
glob_t *glob;
glob = I_StartGlob(path, "*.deh", GLOB_FLAG_NOCASE|GLOB_FLAG_SORTED);
glob = I_StartMultiGlob(path, GLOB_FLAG_NOCASE|GLOB_FLAG_SORTED,
"*.deh", "*.hhe", NULL);
for (;;)
{
filename = I_NextGlob(glob);

View file

@ -910,7 +910,7 @@ void D_DoomMain(void)
{
char *autoload_dir;
autoload_dir = M_GetAutoloadDir("heretic.wad");
// TODO? DEH_AutoLoadPatches(autoload_dir);
DEH_AutoLoadPatches(autoload_dir);
W_AutoLoadWADs(autoload_dir);
free(autoload_dir);
}