Skip to content

Commit

Permalink
the -nosideload parameter prevent automatic loading of nerve/masterle…
Browse files Browse the repository at this point in the history
…vels/sigil

Hopefully fixes #792
  • Loading branch information
fabiangreffrath committed Dec 13, 2021
1 parent 2d1fe97 commit 2f91146
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/doom/d_main.c
Expand Up @@ -1909,7 +1909,7 @@ void D_DoomMain (void)
W_GenerateHashTable();

// [crispy] allow overriding of special-casing
if (!M_ParmExists("-noautoload") && gamemode != shareware)
if (!M_ParmExists("-nosideload") && gamemode != shareware)
{
if (gamemode == retail &&
gameversion == exe_ultimate &&
Expand Down
34 changes: 22 additions & 12 deletions src/doom/d_pwad.c
Expand Up @@ -23,6 +23,7 @@
#include "doomstat.h"
#include "deh_main.h"
#include "d_iwad.h"
#include "m_argv.h"
#include "m_config.h"
#include "m_misc.h"
#include "w_main.h"
Expand Down Expand Up @@ -167,10 +168,13 @@ void D_LoadSigilWad (void)
}

// [crispy] load WAD and DEH files from autoload directories
autoload_dir = M_GetAutoloadDir(sigil_basename, false);
W_AutoLoadWADs(autoload_dir);
DEH_AutoLoadPatches(autoload_dir);
free(autoload_dir);
if (!M_ParmExists("-noautoload"))
{
autoload_dir = M_GetAutoloadDir(sigil_basename, false);
W_AutoLoadWADs(autoload_dir);
DEH_AutoLoadPatches(autoload_dir);
free(autoload_dir);
}

// [crispy] regenerate the hashtable
W_GenerateHashTable();
Expand Down Expand Up @@ -278,10 +282,13 @@ static void CheckLoadNerve (void)
}

// [crispy] load WAD and DEH files from autoload directories
autoload_dir = M_GetAutoloadDir(nerve_basename, false);
W_AutoLoadWADs(autoload_dir);
DEH_AutoLoadPatches(autoload_dir);
free(autoload_dir);
if (!M_ParmExists("-noautoload"))
{
autoload_dir = M_GetAutoloadDir(nerve_basename, false);
W_AutoLoadWADs(autoload_dir);
DEH_AutoLoadPatches(autoload_dir);
free(autoload_dir);
}

// [crispy] regenerate the hashtable
W_GenerateHashTable();
Expand Down Expand Up @@ -382,10 +389,13 @@ static boolean CheckLoadMasterlevels (void)
}

// [crispy] load WAD and DEH files from autoload directories
autoload_dir = M_GetAutoloadDir(master_basename, false);
W_AutoLoadWADs(autoload_dir);
DEH_AutoLoadPatches(autoload_dir);
free(autoload_dir);
if (!M_ParmExists("-noautoload"))
{
autoload_dir = M_GetAutoloadDir(master_basename, false);
W_AutoLoadWADs(autoload_dir);
DEH_AutoLoadPatches(autoload_dir);
free(autoload_dir);
}

// [crispy] regenerate the hashtable
W_GenerateHashTable();
Expand Down

0 comments on commit 2f91146

Please sign in to comment.