From f948c5709ce8ad2bee54d0b64cf0db10d7b0cbb1 Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Wed, 20 Jul 2022 08:54:28 +0200 Subject: [PATCH] extend palette_changes feature to also cover invulnerability colormap effect (#670) --- src/m_menu.c | 2 +- src/p_user.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/m_menu.c b/src/m_menu.c index 41edd1cc..5eb75a41 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -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, diff --git a/src/p_user.c b/src/p_user.c index 84cbefe5..174d3e9b 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -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 */