From 2084754d2c5115b0b2b8e93a2a360687bc796ee2 Mon Sep 17 00:00:00 2001 From: Jaime Passos Date: Thu, 23 Jul 2020 17:44:05 -0300 Subject: [PATCH] Fix boundary checks --- src/r_segs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/r_segs.c b/src/r_segs.c index 3e7a5396f..fbb6b1638 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -1347,7 +1347,7 @@ static void R_RenderSegLoop (void) // Lactozilla: Cull part of the column by the 3D floor if it can't be seen // "bottom" is the top pixel of the floor column - if (ffbottom >= bottom && R_FFloorCanClip(&ffloor[i])) + if (ffbottom >= bottom-1 && R_FFloorCanClip(&ffloor[i])) { floormarked = true; floorclip[rw_x] = fftop; @@ -1395,7 +1395,7 @@ static void R_RenderSegLoop (void) // Lactozilla: Cull part of the column by the 3D floor if it can't be seen // "top" is the height of the ceiling column - if (fftop <= top && R_FFloorCanClip(&ffloor[i])) + if (fftop <= top+1 && R_FFloorCanClip(&ffloor[i])) { ceilingmarked = true; ceilingclip[rw_x] = ffbottom;