Do clipsolid for doorclosed only while your camera is outside of the sector

This commit is contained in:
TehRealSalt 2018-10-06 16:22:36 -04:00
parent 3ed027a4f7
commit 8d39d4be31
2 changed files with 66 additions and 54 deletions

View file

@ -374,6 +374,7 @@ static void R_AddLine(seg_t *line)
INT32 x1, x2;
angle_t angle1, angle2, span, tspan;
static sector_t tempsec; // ceiling/water hack
sector_t *thissec = R_PointInSubsector(viewx, viewy)->sector;
if (line->polyseg && !(line->polyseg->flags & POF_RENDERSIDES))
return;
@ -478,6 +479,8 @@ static void R_AddLine(seg_t *line)
SLOPEPARAMS( backsector->f_slope, backf1, backf2, backsector->floorheight)
SLOPEPARAMS( backsector->c_slope, backc1, backc2, backsector->ceilingheight)
#undef SLOPEPARAMS
if (thissec != backsector && thissec != frontsector)
{
if ((backc1 <= frontf1 && backc2 <= frontf2)
|| (backf1 >= frontc1 && backf2 >= frontc2))
{
@ -492,6 +495,7 @@ static void R_AddLine(seg_t *line)
if (doorclosed)
goto clipsolid;
}
// Window.
if (backc1 != frontc1 || backc2 != frontc2
@ -502,6 +506,8 @@ static void R_AddLine(seg_t *line)
}
else
#endif
{
if (thissec != backsector && thissec != frontsector)
{
if (backsector->ceilingheight <= frontsector->floorheight
|| backsector->floorheight >= frontsector->ceilingheight)
@ -517,6 +523,7 @@ static void R_AddLine(seg_t *line)
if (doorclosed)
goto clipsolid;
}
// Window.
if (backsector->ceilingheight != frontsector->ceilingheight

View file

@ -2020,6 +2020,8 @@ void R_StoreWallRange(INT32 start, INT32 stop)
{
// two sided line
sector_t *thissec = R_PointInSubsector(viewx, viewy)->sector;
#ifdef ESLOPE
if (backsector->c_slope) {
worldhigh = P_GetZAt(backsector->c_slope, segleft.x, segleft.y) - viewz;
@ -2113,6 +2115,8 @@ void R_StoreWallRange(INT32 start, INT32 stop)
// ds_p->sprtopclip = screenheightarray;
}
if (thissec != frontsector && thissec != backsector)
{
#ifdef ESLOPE
if (worldhigh <= worldbottom && worldhighslope <= worldbottomslope)
#else
@ -2160,6 +2164,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
ds_p->silhouette |= SIL_TOP;
}
}
}
if (worldlow != worldbottom
#ifdef ESLOPE