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.
This commit is contained in:
Yamagi 2022-10-23 14:43:10 +02:00
parent 690e46512e
commit 871292934d

View file

@ -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;
}