Skip to content

Commit 6cd8c4e

Browse files
fix 'pwad endoom only' logic (#2138)
* fix 'pwad endoom only' logic * fixed code formatting
1 parent 8d87277 commit 6cd8c4e

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

src/d_main.c

+14-6
Original file line numberDiff line numberDiff line change
@@ -1633,16 +1633,24 @@ static boolean AllowEndDoom(void)
16331633
|| exit_sequence == EXIT_SEQUENCE_ENDOOM_ONLY));
16341634
}
16351635

1636-
static boolean AllowEndDoomPWADOnly() {
1637-
return (!W_IsIWADLump(W_CheckNumForName("ENDOOM")) && endoom_pwad_only);
1638-
}
1639-
16401636
static void D_EndDoom(void)
16411637
{
1642-
if (AllowEndDoom() && AllowEndDoomPWADOnly())
1638+
// Do we even want to show an ENDOOM?
1639+
if (!AllowEndDoom())
16431640
{
1644-
D_ShowEndDoom();
1641+
return;
16451642
}
1643+
1644+
// If so, is it from the IWAD?
1645+
bool iwad_endoom = W_IsIWADLump(W_CheckNumForName("ENDOOM"));
1646+
1647+
// Does the user want to see it, in that case?
1648+
if (iwad_endoom && endoom_pwad_only)
1649+
{
1650+
return;
1651+
}
1652+
1653+
D_ShowEndDoom();
16461654
}
16471655

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

0 commit comments

Comments
 (0)