Merge branch 'ignore-glsegs' into linedef-args

This commit is contained in:
MascaraSnake 2020-01-06 15:14:43 +01:00
commit f13abd5400
5 changed files with 21 additions and 10 deletions

View file

@ -449,8 +449,12 @@ static poly_t *CutOutSubsecPoly(seg_t *lseg, INT32 count, poly_t *poly)
// for each seg of the subsector
for (; count--; lseg++)
{
//x,y,dx,dy (like a divline)
line_t *line = lseg->linedef;
if (lseg->glseg)
continue;
//x,y,dx,dy (like a divline)
p1.x = FIXED_TO_FLOAT(lseg->side ? line->v2->x : line->v1->x);
p1.y = FIXED_TO_FLOAT(lseg->side ? line->v2->y : line->v1->y);
p2.x = FIXED_TO_FLOAT(lseg->side ? line->v1->x : line->v2->x);

View file

@ -2714,8 +2714,6 @@ static void HWR_AddLine(seg_t * line)
static sector_t tempsec;
fixed_t v1x, v1y, v2x, v2y; // the seg's vertexes as fixed_t
if (line->glseg)
return;
#ifdef POLYOBJECTS
if (line->polyseg && !(line->polyseg->flags & POF_RENDERSIDES))
return;
@ -3773,9 +3771,12 @@ static void HWR_Subsector(size_t num)
while (count--)
{
if (!line->glseg
#ifdef POLYOBJECTS
if (!line->polyseg) // ignore segs that belong to polyobjects
&& !line->polyseg // ignore segs that belong to polyobjects
#endif
)
HWR_AddLine(line);
line++;
}

View file

@ -222,6 +222,9 @@ static boolean P_CrossSubsector(size_t num, register los_t *los)
fixed_t fracx, fracy;
#endif
if (seg->glseg)
continue;
// already checked other side?
if (line->validcount == validcount)
continue;

View file

@ -698,6 +698,7 @@ subsector_t *R_IsPointInSubsector(fixed_t x, fixed_t y)
INT32 side, i;
size_t nodenum;
subsector_t *ret;
seg_t *seg;
// single subsector is a special case
if (numnodes == 0)
@ -713,10 +714,15 @@ subsector_t *R_IsPointInSubsector(fixed_t x, fixed_t y)
}
ret = &subsectors[nodenum & ~NF_SUBSECTOR];
for (i = 0; i < ret->numlines; i++)
//if (R_PointOnSegSide(x, y, &segs[ret->firstline + i])) -- breaks in ogl because polyvertex_t cast over vertex pointers
if (P_PointOnLineSide(x, y, segs[ret->firstline + i].linedef) != segs[ret->firstline + i].side)
for (i = 0, seg = &segs[ret->firstline]; i < ret->numlines; i++, seg++)
{
if (seg->glseg)
continue;
//if (R_PointOnSegSide(x, y, seg)) -- breaks in ogl because polyvertex_t cast over vertex pointers
if (P_PointOnLineSide(x, y, seg->linedef) != seg->side)
return 0;
}
return ret;
}

View file

@ -309,9 +309,6 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
// OPTIMIZE: get rid of LIGHTSEGSHIFT globally
curline = ds->curline;
if (curline->glseg)
return;
frontsector = curline->frontsector;
backsector = curline->backsector;
texnum = R_GetTextureNum(curline->sidedef->midtexture);