From db944df467a49e64fbbbad9bdae70f88802d2799 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 22 May 2016 12:15:14 +0200 Subject: [PATCH] - fixed 3D floor rendering with nearby slopes. --- src/r_bsp.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/r_bsp.cpp b/src/r_bsp.cpp index f41e99a74..934d2d3e5 100644 --- a/src/r_bsp.cpp +++ b/src/r_bsp.cpp @@ -622,6 +622,18 @@ void R_AddLine (seg_t *line) rw_backcz2 = backsector->ceilingplane.ZatPoint(line->v2); rw_backfz2 = backsector->floorplane.ZatPoint(line->v2); + if (fake3D & FAKE3D_FAKEBACK) + { + if (rw_frontfz1 >= rw_backfz1 && rw_frontfz2 >= rw_backfz2) + { + fake3D |= FAKE3D_CLIPBOTFRONT; + } + if (rw_frontcz1 <= rw_backcz1 && rw_frontcz2 <= rw_backcz2) + { + fake3D |= FAKE3D_CLIPTOPFRONT; + } + } + // Cannot make these walls solid, because it can result in // sprite clipping problems for sprites near the wall if (rw_frontcz1 > rw_backcz1 || rw_frontcz2 > rw_backcz2) @@ -1334,14 +1346,6 @@ void R_Subsector (subsector_t *sub) fakeFloor->validcount = validcount; R_3D_NewClip(); } - if (frontsector->CenterFloor() >= backsector->CenterFloor()) - { - fake3D |= FAKE3D_CLIPBOTFRONT; - } - if (frontsector->CenterCeiling() <= backsector->CenterCeiling()) - { - fake3D |= FAKE3D_CLIPTOPFRONT; - } R_AddLine(line); // fake } fakeFloor = NULL;