extend palette_changes feature to also cover invulnerability colormap effect (#670)

This commit is contained in:
Fabian Greffrath 2022-07-20 08:54:28 +02:00 committed by GitHub
parent ec4866814f
commit f948c5709c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -3973,7 +3973,7 @@ setup_menu_t gen_settings3[] = { // General Settings screen3
{"On death action", S_CHOICE, m_null, M_X,
M_Y + general_death_action*M_SPC, {"death_use_action"}, 0, NULL, death_use_action_strings},
{"Pain/pickup/radsuit flashes", S_YESNO, m_null, M_X,
{"Pain/pickup/powerup flashes", S_YESNO, m_null, M_X,
M_Y + general_palette_changes*M_SPC, {"palette_changes"}},
{"Screen melt", S_YESNO, m_null, M_X,

View File

@ -340,6 +340,7 @@ void P_PlayerThink (player_t* player)
{
ticcmd_t* cmd;
weapontype_t newweapon;
extern boolean palette_changes;
// [AM] Assume we can interpolate at the beginning
// of the tic.
@ -549,6 +550,14 @@ void P_PlayerThink (player_t* player)
// invulernability, and the light amp visor used the last colormap.
// But white flashes occurred when invulnerability wore off.
if (STRICTMODE(!palette_changes))
{
if (player->powers[pw_invulnerability] || player->powers[pw_infrared])
player->fixedcolormap = 1;
else
player->fixedcolormap = 0;
}
else
player->fixedcolormap =
beta_emulation ? /* Beta Emulation */