Don't need thissec

This commit is contained in:
TehRealSalt 2018-10-06 23:37:27 -04:00
parent ff7b402dc5
commit 8ba3f88553
3 changed files with 6 additions and 11 deletions

View file

@ -2690,8 +2690,6 @@ static void HWR_AddLine(seg_t * line)
// SoM: Backsector needs to be run through R_FakeFlat // SoM: Backsector needs to be run through R_FakeFlat
static sector_t tempsec; static sector_t tempsec;
sector_t *thissec = R_PointInSubsector(viewx, viewy)->sector;
if (line->polyseg && !(line->polyseg->flags & POF_RENDERSIDES)) if (line->polyseg && !(line->polyseg->flags & POF_RENDERSIDES))
return; return;
@ -2813,7 +2811,7 @@ static void HWR_AddLine(seg_t * line)
SLOPEPARAMS( gr_backsector->c_slope, backc1, backc2, gr_backsector->ceilingheight) SLOPEPARAMS( gr_backsector->c_slope, backc1, backc2, gr_backsector->ceilingheight)
#undef SLOPEPARAMS #undef SLOPEPARAMS
if (thissec != gr_backsector && thissec != gr_frontsector) if (viewsector != gr_backsector && viewsector != gr_frontsector)
{ {
// Closed door. // Closed door.
if ((backc1 <= frontf1 && backc2 <= frontf2) if ((backc1 <= frontf1 && backc2 <= frontf2)
@ -2833,7 +2831,7 @@ static void HWR_AddLine(seg_t * line)
else else
#endif #endif
{ {
if (thissec != gr_backsector && thissec != gr_frontsector) if (viewsector != gr_backsector && viewsector != gr_frontsector)
{ {
// Closed door. // Closed door.
if (gr_backsector->ceilingheight <= gr_frontsector->floorheight || if (gr_backsector->ceilingheight <= gr_frontsector->floorheight ||

View file

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

View file

@ -1365,7 +1365,7 @@ static void R_RenderSegLoop (void)
if (bottom >= floorclip[rw_x]) if (bottom >= floorclip[rw_x])
bottom = floorclip[rw_x]-1; bottom = floorclip[rw_x]-1;
if (top <= bottom) if (top <= bottom && ceilingplane)
{ {
ceilingplane->top[rw_x] = (INT16)top; ceilingplane->top[rw_x] = (INT16)top;
ceilingplane->bottom[rw_x] = (INT16)bottom; ceilingplane->bottom[rw_x] = (INT16)bottom;
@ -2020,8 +2020,6 @@ void R_StoreWallRange(INT32 start, INT32 stop)
{ {
// two sided line // two sided line
sector_t *thissec = R_PointInSubsector(viewx, viewy)->sector;
#ifdef ESLOPE #ifdef ESLOPE
if (backsector->c_slope) { if (backsector->c_slope) {
worldhigh = P_GetZAt(backsector->c_slope, segleft.x, segleft.y) - viewz; worldhigh = P_GetZAt(backsector->c_slope, segleft.x, segleft.y) - viewz;
@ -2115,7 +2113,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
// ds_p->sprtopclip = screenheightarray; // ds_p->sprtopclip = screenheightarray;
} }
if (thissec != frontsector && thissec != backsector) if (viewsector != frontsector && viewsector != backsector)
{ {
#ifdef ESLOPE #ifdef ESLOPE
if (worldhigh <= worldbottom && worldhighslope <= worldbottomslope) if (worldhigh <= worldbottom && worldhighslope <= worldbottomslope)