From def3082ed8f5c9f1c8e5fe4282595db37cc86f8c Mon Sep 17 00:00:00 2001 From: "Dileep V. Reddy" Date: Fri, 7 Mar 2025 21:57:10 -0700 Subject: [PATCH] Forgot to account for when both floor and ceiling of a sector are portals. --- src/rendering/hwrenderer/scene/hw_portal.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/rendering/hwrenderer/scene/hw_portal.cpp b/src/rendering/hwrenderer/scene/hw_portal.cpp index 6877f7982d..965582a2e6 100644 --- a/src/rendering/hwrenderer/scene/hw_portal.cpp +++ b/src/rendering/hwrenderer/scene/hw_portal.cpp @@ -815,9 +815,7 @@ bool HWSectorStackPortal::Setup(HWDrawInfo *di, FRenderState &rstate, Clipper *c if (origin->plane != -1) screen->instack[origin->plane]++; if (lines.Size() > 0) { - flat.plane.GetFromSector(lines[0].sub->sector, - lines[0].sub->sector->GetPortal(sector_t::ceiling)->mType & (PORTS_STACKEDSECTORTHING | PORTS_PORTAL | PORTS_LINKEDPORTAL) ? - sector_t::ceiling : sector_t::floor); + flat.plane.GetFromSector(lines[0].sub->sector, origin->plane); di->SetClipHeight(flat.plane.plane.ZatPoint(vp.Pos), flat.plane.plane.Normal().Z > 0 ? -1.f : 1.f); }