summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2014-10-17 01:55:01 -0400
committerSimon Howard2014-10-17 01:55:01 -0400
commit621552f637fff1fcdf3f3a5e9b450d733c01c746 (patch)
treec0ef8293f6dd006fc22d75125a6d1c1b591bee8e
parent3dce9e52b1eae4b54e355115eb57e76a8cf7408d (diff)
downloadchocolate-doom-621552f637fff1fcdf3f3a5e9b450d733c01c746.tar.gz
chocolate-doom-621552f637fff1fcdf3f3a5e9b450d733c01c746.tar.bz2
chocolate-doom-621552f637fff1fcdf3f3a5e9b450d733c01c746.zip
doom: Add -noiwaddeh command line parameter.
Both the Freedoom IWADs and the rereleased HACX IWAD contain embedded DEHACKED lumps that are automatically loaded on startup. However, there may be some situations where it is undesirable to load these patches - when loading certain mods such as BTSX, for example. For these cases, allow the user to override the default behavior with a command line parameter.
-rw-r--r--src/doom/d_main.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/doom/d_main.c b/src/doom/d_main.c
index d4859b30..15134d7a 100644
--- a/src/doom/d_main.c
+++ b/src/doom/d_main.c
@@ -1066,7 +1066,8 @@ static void LoadHacxDeh(void)
if (gameversion == exe_hacx)
{
- if (!DEH_LoadLumpByName("DEHACKED", true, false))
+ if (!M_ParmExists("-noiwaddeh")
+ && !DEH_LoadLumpByName("DEHACKED", true, false))
{
I_Error("DEHACKED lump not found. Please check that this is the "
"Hacx v1.2 IWAD.");
@@ -1300,12 +1301,21 @@ void D_DoomMain (void)
W_CheckCorrectIWAD(doom);
// The Freedoom IWADs have DEHACKED lumps with cosmetic changes to the
- // in-game messages. Load this.
- // Old versions of Freedoom (before 2014-09) did not have technically
- // valid DEHACKED lumps, so ignore errors and just continue if this
- // is an old IWAD.
- if (W_CheckNumForName("FREEDOOM") >= 0)
+ // in-game messages. Load this, but allow it to be disabled on the
+ // command line if desired.
+
+ //!
+ // @category mod
+ //
+ // Disable automatic loading of Dehacked patches contained in some
+ // IWAD files.
+
+ if (!M_ParmExists("-noiwaddeh")
+ && W_CheckNumForName("FREEDOOM") >= 0)
{
+ // Old versions of Freedoom (before 2014-09) did not have technically
+ // valid DEHACKED lumps, so ignore errors and just continue if this
+ // is an old IWAD.
DEH_LoadLumpByName("DEHACKED", false, true);
}