From b5c7fd5a2b69388bdfada42c1384f889b38183e2 Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 18 May 2026 18:00:40 +0200 Subject: [PATCH] HWR_Subsector: check for sub->polyList instead of numpolys numpolys sometimes might not get reset, checking for sub->polyList is what was actually intended --- src/hardware/hw_main.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/hardware/hw_main.cpp b/src/hardware/hw_main.cpp index 3f4ccf23e..5a45090de 100644 --- a/src/hardware/hw_main.cpp +++ b/src/hardware/hw_main.cpp @@ -2632,7 +2632,6 @@ static boolean HWR_CheckBBox(const fixed_t *bspcoord) return gld_clipper_SafeCheckRange(angle2, angle1); } - // // HWR_AddPolyObjectSegs // @@ -3231,11 +3230,11 @@ doaddline: // without talking about the overdraw of course. sub->sector->validcount = validcount;/// \todo fix that in a better way - if (UNLIKELY(numpolys)) + if (UNLIKELY(sub->polyList)) { while (count--) { - if (LIKELY(!line->polyseg)) // ignore segs that belong to polyobjects + if (!line->polyseg) // ignore segs that belong to polyobjects { HWR_AddLine(line); }