From ff591bce04ec98d439a1f1464c4b05017aeb7e1b Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 10 Sep 2024 10:58:09 +0200 Subject: [PATCH] Revert "Zzz..." This reverts commit c3a03d89c4919f5da98a7e68859aedfad7cd4bc0. --- src/hardware/hw_main.c | 5 +++++ src/r_bsp.c | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index bdbe8a6b6..8bf6f715d 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -2521,6 +2521,11 @@ doaddline: if (gr_backsector->ceilingpic == skyflatnum && gr_frontsector->ceilingpic == skyflatnum && gr_backsector->floorpic == skyflatnum && gr_frontsector->floorpic == skyflatnum) // everything's sky? let's save us a bit of time then { + if (!line->polyseg && + !line->sidedef->midtexture + && ((!gr_frontsector->ffloors && !gr_backsector->ffloors) + || (gr_frontsector->tag == gr_backsector->tag))) + return; // line is empty, don't even bother // treat like wide open window instead HWR_ProcessSeg(); // Doesn't need arguments because they're defined globally :D return; diff --git a/src/r_bsp.c b/src/r_bsp.c index d68816496..9043ecd60 100644 --- a/src/r_bsp.c +++ b/src/r_bsp.c @@ -500,9 +500,14 @@ static void R_AddLine(seg_t *line) doorclosed = 0; - if (backsector->ceilingpic == skyflatnum && frontsector->ceilingpic == skyflatnum - && backsector->floorpic == skyflatnum && frontsector->floorpic == skyflatnum) // everything's sky? let's save us a bit of time then + if (backsector->ceilingpic == skyflatnum && frontsector->ceilingpic == skyflatnum && backsector->floorpic == skyflatnum && frontsector->floorpic == skyflatnum) // everything's sky? let's save us a bit of time then { + if (!line->polyseg && + !line->sidedef->midtexture + && ((!frontsector->ffloors && !backsector->ffloors) + || (frontsector->tag == backsector->tag))) + return; // line is empty, don't even bother + goto clippass; // treat like wide open window instead }