diff --git a/src/g_demo.c b/src/g_demo.c index 6b2c8f1c9..de8523ae9 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -3411,11 +3411,6 @@ void G_StopDemo(void) demo.rewinding = false; CL_ClearRewinds(); - if (gamestate == GS_LEVEL && rendermode != render_none) - { - V_SetPaletteLump("PLAYPAL"); // Reset the palette - R_ReInitColormaps(0, LUMPERROR); - } if (gamestate == GS_INTERMISSION) Y_EndIntermission(); // cleanup if (gamestate == GS_VOTING) @@ -3427,6 +3422,12 @@ void G_StopDemo(void) wipegamestate = GS_NULL; SV_StopServer(); SV_ResetServer(); + + if (gamestate == GS_LEVEL && rendermode != render_none) + { + V_SetPaletteLump("PLAYPAL"); // Reset the palette + R_ReInitColormaps(0, LUMPERROR); + } } // Stops timing a demo. diff --git a/src/r_main.cpp b/src/r_main.cpp index a340ef29c..5313357d6 100644 --- a/src/r_main.cpp +++ b/src/r_main.cpp @@ -943,9 +943,10 @@ void R_ExecuteSetViewSize(void) memset(scalelight, 0xFF, sizeof(scalelight)); // Calculate the light levels to use for each level/scale combination. - for (i = 0; i< LIGHTLEVELS; i++) + for (i = 0; i < LIGHTLEVELS; i++) { startmapl = ((LIGHTLEVELS - 1 - i)*2)*NUMCOLORMAPS/LIGHTLEVELS; + for (j = 0; j < MAXLIGHTSCALE; j++) { level = startmapl - j*vid.width/(viewwidth)/DISTMAP;