summaryrefslogtreecommitdiff
path: root/src/doom/d_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/doom/d_main.c')
-rw-r--r--src/doom/d_main.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/doom/d_main.c b/src/doom/d_main.c
index 3badb4ad..4068f677 100644
--- a/src/doom/d_main.c
+++ b/src/doom/d_main.c
@@ -1050,7 +1050,7 @@ static void LoadHacxDeh(void)
if (gameversion == exe_hacx)
{
- if (!DEH_LoadLumpByName("DEHACKED"))
+ if (!DEH_LoadLumpByName("DEHACKED", true))
{
I_Error("DEHACKED lump not found. Please check that this is the "
"Hacx v1.2 IWAD.");
@@ -1425,6 +1425,31 @@ void D_DoomMain (void)
I_PrintDivider();
}
+ // Load DEHACKED lumps from WAD files - but only if we give the right
+ // command line parameter.
+
+ //!
+ // @category mod
+ //
+ // Load Dehacked patches from DEHACKED lumps contained in one of the
+ // loaded PWAD files.
+ //
+ if (M_ParmExists("-dehlump"))
+ {
+ int i, loaded = 0;
+
+ for (i = 0; i < numlumps; ++i)
+ {
+ if (!strncmp(lumpinfo[i].name, "DEHACKED", 8))
+ {
+ DEH_LoadLump(i, false);
+ loaded++;
+ }
+ }
+
+ printf("Loaded %i DEHACKED lumps from WAD files.\n", loaded);
+ }
+
DEH_printf("I_Init: Setting up machine state.\n");
I_CheckIsScreensaver();
I_InitTimer();