From dec3348a9a2584fa375407341ea265535dc0f8e3 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 18 Oct 2014 20:48:40 -0400 Subject: Fix dehacked patch loading order. The order in which we load dehacked patches is important. Change the order so that IWAD dehacked patches are loaded before any others, and so if, for example, we're playing with Freedoom, the Freedoom string replacements can be overridden by those from extra mods we're playing with. As part of this, ditch DEH_Init() and use DEH_ParseCommandLine() instead to handle the -deh option. Remove the DEH_Init() message from startup and show messages about dehacked patches that we load with the WAD files that we load. --- src/heretic/d_main.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/heretic') diff --git a/src/heretic/d_main.c b/src/heretic/d_main.c index 4177bd09..8389a23d 100644 --- a/src/heretic/d_main.c +++ b/src/heretic/d_main.c @@ -955,11 +955,6 @@ void D_DoomMain(void) DEH_printf("Z_Init: Init zone memory allocation daemon.\n"); Z_Init(); -#ifdef FEATURE_DEHACKED - printf("DEH_Init: Init Dehacked support.\n"); - DEH_Init(); -#endif - DEH_printf("W_Init: Init WADfiles.\n"); iwadfile = D_FindIWAD(IWAD_MASK_HERETIC, &gamemission); @@ -972,6 +967,13 @@ void D_DoomMain(void) D_AddFile(iwadfile); W_CheckCorrectIWAD(heretic); + +#ifdef FEATURE_DEHACKED + // Load dehacked patches specified on the command line. + DEH_ParseCommandLine(); +#endif + + // Load PWAD files. W_ParseCommandLine(); //! -- cgit v1.2.3