HWR_Subsector: check for sub->polyList instead of numpolys

numpolys sometimes might not get reset, checking for sub->polyList is what was actually intended
This commit is contained in:
alufolie91 committed 2026-05-18 18:21:00 +02:00
1 parent da103f54d6
commit b5c7fd5a2b
1 file changed
+2 -3
+2 -3
View File
@@ -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);
}