Skip to content

Commit

Permalink
fix 'pwad endoom only' logic
Browse files Browse the repository at this point in the history
  • Loading branch information
elf-alchemist committed Jan 10, 2025
1 parent 8d87277 commit 53a92ed
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/d_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1633,16 +1633,21 @@ static boolean AllowEndDoom(void)
|| exit_sequence == EXIT_SEQUENCE_ENDOOM_ONLY));
}

static boolean AllowEndDoomPWADOnly() {
return (!W_IsIWADLump(W_CheckNumForName("ENDOOM")) && endoom_pwad_only);
}


static void D_EndDoom(void)
{
if (AllowEndDoom() && AllowEndDoomPWADOnly())
{
D_ShowEndDoom();
}
// Do we even want to show an ENDOOM?
if (!AllowEndDoom()) return;

// If so, is it from the IWAD?
bool iwad_endoom = W_IsIWADLump(W_CheckNumForName("ENDOOM"));

// Does the user want to see it, in that case?
if (iwad_endoom && endoom_pwad_only) return;

D_ShowEndDoom();

}

// [FG] fast-forward demo to the desired map
Expand Down

0 comments on commit 53a92ed

Please sign in to comment.