From d232e0e2c6e6579d1fff72da35bb1eb67b5238a8 Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 1 Feb 2024 01:43:38 +0100 Subject: [PATCH] oops --- src/hardware/hw_main.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index dff854131..15b019e67 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -3769,25 +3769,19 @@ void HWR_RenderBSPNode(INT32 bspnum) // Found a subsector? if (bspnum & NF_SUBSECTOR) { - if (bspnum == -1) + // PORTAL CULLING + if (portalclipline) { - HWR_Subsector(0); - } - else - { - // PORTAL CULLING - if (portalclipline) + sector_t *sect = subsectors[bspnum & ~NF_SUBSECTOR].sector; + if (portalcullsector) { - if (portalcullsector) - { - if (portalcullsector != subsectors[bspnum & ~NF_SUBSECTOR].sector) - return; - else - portalcullsector = NULL; - } + if (sect != portalcullsector) + return; + portalcullsector = NULL; } - HWR_Subsector(bspnum&(~NF_SUBSECTOR)); } + if (bspnum != -1) + HWR_Subsector(bspnum&(~NF_SUBSECTOR)); return; }