From d49cd9755bdb11b7037a3fe906c322df22225180 Mon Sep 17 00:00:00 2001
From: Sally Cochenour <tehrealsalt@gmail.com>
Date: Wed, 8 Jan 2020 04:10:23 -0500
Subject: [PATCH] Fullbright transparent planes

(I disagree with this feature so hard but w/e)

(cherry picked from commit fe809b2734d430655966151e56f96963e2d7b2cf)
---
 src/hardware/hw_main.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c
index 769aad5b71..50b6fcbf5d 100644
--- a/src/hardware/hw_main.c
+++ b/src/hardware/hw_main.c
@@ -5158,7 +5158,12 @@ void HWR_AddTransparentFloor(levelflat_t *levelflat, extrasubsector_t *xsub, boo
 
 	planeinfo[numplanes].isceiling = isceiling;
 	planeinfo[numplanes].fixedheight = fixedheight;
-	planeinfo[numplanes].lightlevel = lightlevel;
+
+	if (planecolormap && (planecolormap->fog & 1))
+		planeinfo[numplanes].lightlevel = lightlevel;
+	else
+		planeinfo[numplanes].lightlevel = 255;
+
 	planeinfo[numplanes].levelflat = levelflat;
 	planeinfo[numplanes].xsub = xsub;
 	planeinfo[numplanes].alpha = alpha;
@@ -5190,7 +5195,12 @@ void HWR_AddTransparentPolyobjectFloor(levelflat_t *levelflat, polyobj_t *polyse
 
 	polyplaneinfo[numpolyplanes].isceiling = isceiling;
 	polyplaneinfo[numpolyplanes].fixedheight = fixedheight;
-	polyplaneinfo[numpolyplanes].lightlevel = lightlevel;
+
+	if (planecolormap && (planecolormap->fog & 1))
+		polyplaneinfo[numpolyplanes].lightlevel = lightlevel;
+	else
+		polyplaneinfo[numpolyplanes].lightlevel = 255;
+
 	polyplaneinfo[numpolyplanes].levelflat = levelflat;
 	polyplaneinfo[numpolyplanes].polysector = polysector;
 	polyplaneinfo[numpolyplanes].alpha = alpha;
-- 
GitLab