From 35fd7e6a08e2ef2cc9fbce24b4b9f393df5b0a3d Mon Sep 17 00:00:00 2001 From: toaster Date: Sat, 11 Aug 2018 22:36:14 +0100 Subject: [PATCH] * Fix issue with palette not getting reset when heading to intermission. * Make map hell maps MUCH less common by ignoring all but the three most recent maps in the buffer for the random option. --- src/d_main.c | 11 ++++++----- src/g_game.c | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index 120307e3..6c3f9a42 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -317,11 +317,12 @@ static void D_Display(void) V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, 31); F_WipeEndScreen(); F_RunWipe(wipedefs[wipedefindex], gamestate != GS_TIMEATTACK); - if (wipegamestate == GS_LEVEL && rendermode != render_none) - { - V_SetPaletteLump("PLAYPAL"); // Reset the palette - R_ReInitColormaps(0); - } + } + + if (wipegamestate == GS_LEVEL && rendermode != render_none) + { + V_SetPaletteLump("PLAYPAL"); // Reset the palette + R_ReInitColormaps(0); } F_WipeStartScreen(); diff --git a/src/g_game.c b/src/g_game.c index 81f94845..756c22d6 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -3225,7 +3225,7 @@ INT16 G_RandMap(INT16 tolflags, INT16 pprevmap, boolean dontadd, boolean ignoreb if (!ignorebuffer) { - for (bufx = 0; bufx < NUMMAPS; bufx++) + for (bufx = 0; bufx < (maphell ? 3 : NUMMAPS); bufx++) { if (randmapbuffer[bufx] == -1) // Rest of buffer SHOULD be empty break;