summaryrefslogtreecommitdiff
path: root/src/strife/d_main.c
diff options
context:
space:
mode:
authorSimon Howard2014-10-18 20:48:40 -0400
committerSimon Howard2014-10-18 20:48:40 -0400
commitdec3348a9a2584fa375407341ea265535dc0f8e3 (patch)
tree930402a3f0fedf44bb9c3a9b66e3152086b93a96 /src/strife/d_main.c
parent5914e16076339ef487094dba8be67eed21b0a811 (diff)
downloadchocolate-doom-dec3348a9a2584fa375407341ea265535dc0f8e3.tar.gz
chocolate-doom-dec3348a9a2584fa375407341ea265535dc0f8e3.tar.bz2
chocolate-doom-dec3348a9a2584fa375407341ea265535dc0f8e3.zip
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.
Diffstat (limited to 'src/strife/d_main.c')
-rw-r--r--src/strife/d_main.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/strife/d_main.c b/src/strife/d_main.c
index b2eadd96..1ce9c132 100644
--- a/src/strife/d_main.c
+++ b/src/strife/d_main.c
@@ -1390,12 +1390,6 @@ void D_DoomMain (void)
}
#endif
-
-#ifdef FEATURE_DEHACKED
- if(devparm)
- printf("DEH_Init: Init Dehacked support.\n");
- DEH_Init();
-#endif
//!
// @vanilla
@@ -1558,6 +1552,13 @@ void D_DoomMain (void)
DEH_printf("W_Init: Init WADfiles.\n");
D_AddFile(iwadfile);
W_CheckCorrectIWAD(strife);
+
+#ifdef FEATURE_DEHACKED
+ // Load dehacked patches specified on the command line.
+ DEH_ParseCommandLine();
+#endif
+
+ // Load PWAD files.
modifiedgame = W_ParseCommandLine();
// [STRIFE] serial number output