Skip to content

Commit

Permalink
Disallow SIGIL2.WAD to be [auto]loaded twice
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Nov 8, 2023
1 parent 2448602 commit 7baa7b5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/w_wad.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ bool W_AddFile(char *filename, bool autoloaded)
{
static bool resourcewadadded;
static bool sigilwadadded;
static bool sigil2wadadded;
static bool nervewadadded;
wadinfo_t header;
size_t length;
Expand Down Expand Up @@ -329,6 +330,11 @@ bool W_AddFile(char *filename, bool autoloaded)
else if (buckethead && (M_StringCompare(file, "SIGIL_SHREDS.wad")
|| M_StringCompare(file, "SIGIL_SHREDS_COMPAT.wad")))
return false;
else if (sigil2wadadded && D_IsSIGIL2WAD(file))
return false;
else if (thorr && (M_StringCompare(file, "SIGIL2_SHREDS.wad")
|| M_StringCompare(file, "SIGIL2_SHREDS_COMPAT.wad")))
return false;
else if (nervewadadded && M_StringCompare(file, "NERVE.WAD"))
return false;

Expand Down Expand Up @@ -410,7 +416,7 @@ bool W_AddFile(char *filename, bool autoloaded)
}
else if (D_IsSIGIL2WAD(file))
{
sigilwadadded = true;
sigil2wadadded = true;
autosigil2 = autoloaded;
C_Output("You can now play John Romero's " ITALICS("SIGIL II")
" by choosing it in the episode menu.");
Expand Down

0 comments on commit 7baa7b5

Please sign in to comment.