mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-12-02 09:12:54 +00:00
Merge branch 'ignore-glsegs' into linedef-args
This commit is contained in:
commit
f13abd5400
5 changed files with 21 additions and 10 deletions
|
@ -449,8 +449,12 @@ static poly_t *CutOutSubsecPoly(seg_t *lseg, INT32 count, poly_t *poly)
|
||||||
// for each seg of the subsector
|
// for each seg of the subsector
|
||||||
for (; count--; lseg++)
|
for (; count--; lseg++)
|
||||||
{
|
{
|
||||||
//x,y,dx,dy (like a divline)
|
|
||||||
line_t *line = lseg->linedef;
|
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.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);
|
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);
|
p2.x = FIXED_TO_FLOAT(lseg->side ? line->v1->x : line->v2->x);
|
||||||
|
|
|
@ -2714,8 +2714,6 @@ static void HWR_AddLine(seg_t * line)
|
||||||
static sector_t tempsec;
|
static sector_t tempsec;
|
||||||
|
|
||||||
fixed_t v1x, v1y, v2x, v2y; // the seg's vertexes as fixed_t
|
fixed_t v1x, v1y, v2x, v2y; // the seg's vertexes as fixed_t
|
||||||
if (line->glseg)
|
|
||||||
return;
|
|
||||||
#ifdef POLYOBJECTS
|
#ifdef POLYOBJECTS
|
||||||
if (line->polyseg && !(line->polyseg->flags & POF_RENDERSIDES))
|
if (line->polyseg && !(line->polyseg->flags & POF_RENDERSIDES))
|
||||||
return;
|
return;
|
||||||
|
@ -3773,9 +3771,12 @@ static void HWR_Subsector(size_t num)
|
||||||
|
|
||||||
while (count--)
|
while (count--)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (!line->glseg
|
||||||
#ifdef POLYOBJECTS
|
#ifdef POLYOBJECTS
|
||||||
if (!line->polyseg) // ignore segs that belong to polyobjects
|
&& !line->polyseg // ignore segs that belong to polyobjects
|
||||||
#endif
|
#endif
|
||||||
|
)
|
||||||
HWR_AddLine(line);
|
HWR_AddLine(line);
|
||||||
line++;
|
line++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -222,6 +222,9 @@ static boolean P_CrossSubsector(size_t num, register los_t *los)
|
||||||
fixed_t fracx, fracy;
|
fixed_t fracx, fracy;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (seg->glseg)
|
||||||
|
continue;
|
||||||
|
|
||||||
// already checked other side?
|
// already checked other side?
|
||||||
if (line->validcount == validcount)
|
if (line->validcount == validcount)
|
||||||
continue;
|
continue;
|
||||||
|
|
12
src/r_main.c
12
src/r_main.c
|
@ -698,6 +698,7 @@ subsector_t *R_IsPointInSubsector(fixed_t x, fixed_t y)
|
||||||
INT32 side, i;
|
INT32 side, i;
|
||||||
size_t nodenum;
|
size_t nodenum;
|
||||||
subsector_t *ret;
|
subsector_t *ret;
|
||||||
|
seg_t *seg;
|
||||||
|
|
||||||
// single subsector is a special case
|
// single subsector is a special case
|
||||||
if (numnodes == 0)
|
if (numnodes == 0)
|
||||||
|
@ -713,10 +714,15 @@ subsector_t *R_IsPointInSubsector(fixed_t x, fixed_t y)
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = &subsectors[nodenum & ~NF_SUBSECTOR];
|
ret = &subsectors[nodenum & ~NF_SUBSECTOR];
|
||||||
for (i = 0; i < ret->numlines; i++)
|
for (i = 0, seg = &segs[ret->firstline]; i < ret->numlines; i++, seg++)
|
||||||
//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)
|
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 0;
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -309,9 +309,6 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2)
|
||||||
// OPTIMIZE: get rid of LIGHTSEGSHIFT globally
|
// OPTIMIZE: get rid of LIGHTSEGSHIFT globally
|
||||||
curline = ds->curline;
|
curline = ds->curline;
|
||||||
|
|
||||||
if (curline->glseg)
|
|
||||||
return;
|
|
||||||
|
|
||||||
frontsector = curline->frontsector;
|
frontsector = curline->frontsector;
|
||||||
backsector = curline->backsector;
|
backsector = curline->backsector;
|
||||||
texnum = R_GetTextureNum(curline->sidedef->midtexture);
|
texnum = R_GetTextureNum(curline->sidedef->midtexture);
|
||||||
|
|
Loading…
Reference in a new issue