From 871292934dfeb4a10be23b673ee16c4f47a394ba Mon Sep 17 00:00:00 2001 From: Yamagi Date: Sun, 23 Oct 2022 14:43:10 +0200 Subject: [PATCH] Work around wrong palette after skiping cinematic whith `developer 1`. Quake II has two palettes. One static palette used for the world and one dynamic palette used by cinematics. Switching from the cinematic back to the world palette is handled by putting up the loading plaque. Since a cinematic always ends with loading somehting else this generally works. Unfortunatly setting `developer 1` skips the loading plaque. The palette never gets reset and the world looks like a bad LSD trip. ;) A correct fix is complicated, because the loading plaque logic is messed up and working by luck. Reworking the logic has a high propability breaking corner cased exploited by mods. Therefor take the easy route and uncoditionally switch to the world palette when bringing up the loading plaque with `developer 1`. Closes #925. --- src/client/cl_screen.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/client/cl_screen.c b/src/client/cl_screen.c index 8940a0f3..ac2ff741 100644 --- a/src/client/cl_screen.c +++ b/src/client/cl_screen.c @@ -584,6 +584,16 @@ SCR_BeginLoadingPlaque(void) if (developer->value) { + /* Hack: When we are returning here (not drawing + the loading plaque) we don't reset the palette + later on. We might end up with the cinematic + palette applied to the world. Enforce the world + palette. */ + if (cl.cinematictime > 0) + { + R_SetPalette(NULL); + } + return; }