diff --git a/src/doom/p_lights.c b/src/doom/p_lights.c index ff50ac892..96ddacc8d 100644 --- a/src/doom/p_lights.c +++ b/src/doom/p_lights.c @@ -56,8 +56,6 @@ void T_FireFlicker (fireflicker_t* flick) // [crispy] A11Y if (a11y_sector_lighting) flick->sector->rlightlevel = flick->sector->lightlevel; - else - flick->sector->rlightlevel = flick->maxlight; } @@ -114,8 +112,6 @@ void T_LightFlash (lightflash_t* flash) // [crispy] A11Y if (a11y_sector_lighting) flash->sector->rlightlevel = flash->sector->lightlevel; - else - flash->sector->rlightlevel = flash->maxlight; } @@ -176,8 +172,6 @@ void T_StrobeFlash (strobe_t* flash) // [crispy] A11Y if (a11y_sector_lighting) flash->sector->rlightlevel = flash->sector->lightlevel; - else - flash->sector->rlightlevel = flash->maxlight; } @@ -353,8 +347,6 @@ void T_Glow(glow_t* g) // [crispy] A11Y if (a11y_sector_lighting) g->sector->rlightlevel = g->sector->lightlevel; - else - g->sector->rlightlevel = g->maxlight; } diff --git a/src/doom/p_saveg.c b/src/doom/p_saveg.c index d6813bde3..6f775094e 100644 --- a/src/doom/p_saveg.c +++ b/src/doom/p_saveg.c @@ -1343,7 +1343,8 @@ static void saveg_read_strobe_t(strobe_t *str) // int brighttime; str->brighttime = saveg_read32(); - if (!a11y_sector_lighting) + if (!a11y_sector_lighting && + str->sector->rlightlevel < str->maxlight) // [crispy] Ensure maxlight among competing thinkers. str->sector->rlightlevel = str->maxlight; } diff --git a/src/heretic/p_lights.c b/src/heretic/p_lights.c index 32dda406a..b89e9e7e0 100644 --- a/src/heretic/p_lights.c +++ b/src/heretic/p_lights.c @@ -56,8 +56,6 @@ void T_LightFlash(thinker_t *thinker) // [crispy] A11Y if (a11y_sector_lighting) flash->sector->rlightlevel = flash->sector->lightlevel; - else - flash->sector->rlightlevel = flash->maxlight; } @@ -120,8 +118,6 @@ void T_StrobeFlash(thinker_t *thinker) // [crispy] A11Y if (a11y_sector_lighting) flash->sector->rlightlevel = flash->sector->lightlevel; - else - flash->sector->rlightlevel = flash->maxlight; } //================================================================== @@ -281,8 +277,6 @@ void T_Glow(thinker_t *thinker) // [crispy] A11Y if (a11y_sector_lighting) g->sector->rlightlevel = g->sector->lightlevel; - else - g->sector->rlightlevel = g->maxlight; } void P_SpawnGlowingLight(sector_t * sector) diff --git a/src/heretic/p_saveg.c b/src/heretic/p_saveg.c index 2dfb09120..a9615c7f6 100644 --- a/src/heretic/p_saveg.c +++ b/src/heretic/p_saveg.c @@ -24,6 +24,7 @@ #include "m_misc.h" #include "p_local.h" #include "v_video.h" +#include "a11y.h" static FILE *SaveGameFP; @@ -1418,6 +1419,9 @@ static void saveg_read_lightflash_t(lightflash_t *str) // int mintime; str->mintime = SV_ReadLong(); + + if (!a11y_sector_lighting) + str->sector->rlightlevel = str->maxlight; } static void saveg_write_lightflash_t(lightflash_t *str) @@ -1474,6 +1478,10 @@ static void saveg_read_strobe_t(strobe_t *str) // int brighttime; str->brighttime = SV_ReadLong(); + + if (!a11y_sector_lighting && + str->sector->rlightlevel < str->maxlight) // [crispy] Ensure maxlight among competing thinkers. + str->sector->rlightlevel = str->maxlight; } static void saveg_write_strobe_t(strobe_t *str) @@ -1524,6 +1532,9 @@ static void saveg_read_glow_t(glow_t *str) // int direction; str->direction = SV_ReadLong(); + + if (!a11y_sector_lighting) + str->sector->rlightlevel = str->maxlight; } static void saveg_write_glow_t(glow_t *str)