From 0ffb241c0a1705273c0c93790b67d2ce3474ad0e Mon Sep 17 00:00:00 2001 From: Jaime Ita Passos Date: Wed, 2 Dec 2020 15:31:11 -0300 Subject: [PATCH 1/2] Fix 3D floor culling with polyobject segs --- 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 1ed1f0285..3bc0d011c 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -1191,7 +1191,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-1 && R_FFloorCanClip(&ffloor[i])) + if (ffbottom >= bottom-1 && R_FFloorCanClip(&ffloor[i]) && !curline->polyseg) { rw_floormarked = true; floorclip[rw_x] = fftop; @@ -1239,7 +1239,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+1 && R_FFloorCanClip(&ffloor[i])) + if (fftop <= top+1 && R_FFloorCanClip(&ffloor[i]) && !curline->polyseg) { rw_ceilingmarked = true; ceilingclip[rw_x] = ffbottom; From 47b8c0648b2b87fdf7ec388e1f0c3b48239c8cff Mon Sep 17 00:00:00 2001 From: Jaime Ita Passos Date: Wed, 2 Dec 2020 15:34:11 -0300 Subject: [PATCH 2/2] Don't clip if the 3D floor is fog --- src/r_segs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r_segs.c b/src/r_segs.c index 3bc0d011c..c79071e9b 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -540,7 +540,7 @@ static boolean R_IsFFloorTranslucent(visffloor_t *pfloor) // Polyobjects have no ffloors, and they're handled in the conditional above. if (pfloor->ffloor != NULL) - return (pfloor->ffloor->flags & FF_TRANSLUCENT); + return (pfloor->ffloor->flags & (FF_TRANSLUCENT|FF_FOG)); return false; }