From 3a7241d9d3d02ceacfa3aefd0c4096bcbbb03bb1 Mon Sep 17 00:00:00 2001
From: Monster Iestyn <iestynjealous@ntlworld.com>
Date: Fri, 25 May 2018 20:54:50 +0100
Subject: [PATCH] change fickle's hack so that the bottoms of polyobj plane
 columns are set to 0 instead of 65535 when not intended to be visible

---
 src/r_segs.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/r_segs.c b/src/r_segs.c
index 5395f414a0..9e5060da9d 100644
--- a/src/r_segs.c
+++ b/src/r_segs.c
@@ -1443,7 +1443,8 @@ static void R_RenderSegLoop (void)
 #ifdef POLYOBJECTS_PLANES
 					// Polyobject-specific hack to fix plane leaking -Red
 					if (ffloor[i].polyobj && top_w >= bottom_w) {
-						ffloor[i].plane->top[rw_x] = ffloor[i].plane->bottom[rw_x] = 0xFFFF;
+						ffloor[i].plane->top[rw_x] = 0xFFFF;
+						ffloor[i].plane->bottom[rw_x] = 0x0000; // fix for sky plane drawing crashes - Monster Iestyn 25/05/18
 					} else
 #endif
 
@@ -1467,7 +1468,8 @@ static void R_RenderSegLoop (void)
 #ifdef POLYOBJECTS_PLANES
 					// Polyobject-specific hack to fix plane leaking -Red
 					if (ffloor[i].polyobj && top_w >= bottom_w) {
-						ffloor[i].plane->top[rw_x] = ffloor[i].plane->bottom[rw_x] = 0xFFFF;
+						ffloor[i].plane->top[rw_x] = 0xFFFF;
+						ffloor[i].plane->bottom[rw_x] = 0x0000; // fix for sky plane drawing crashes - Monster Iestyn 25/05/18
 					} else
 #endif
 
-- 
GitLab