smol optimization R_AddLine

This commit is contained in:
Alug committed 2024-09-09 22:57:21 +02:00
1 parent f9463d8efa
commit 677cdc77e4
2 files changed
+14 -2

No files matched your search

+3 -2
View File
@@ -2523,8 +2523,9 @@ doaddline:
{
if (!line->polyseg &&
!line->sidedef->midtexture
&& ((!gr_frontsector->ffloors && !gr_backsector->ffloors)))
return; // line is empty, don't even bother
&& ((!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;
+11
View File
@@ -500,6 +500,17 @@ 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 (!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
}
// Closed door.
if (frontsector->f_slope || frontsector->c_slope || backsector->f_slope || backsector->c_slope)
{