mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 04:21:47 +00:00
Do clipsolid for doorclosed only while your camera is outside of the sector
This commit is contained in:
parent
3ed027a4f7
commit
8d39d4be31
2 changed files with 66 additions and 54 deletions
|
|
@ -374,6 +374,7 @@ 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;
|
||||||
|
|
@ -478,6 +479,8 @@ 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 ((backc1 <= frontf1 && backc2 <= frontf2)
|
if ((backc1 <= frontf1 && backc2 <= frontf2)
|
||||||
|| (backf1 >= frontc1 && backf2 >= frontc2))
|
|| (backf1 >= frontc1 && backf2 >= frontc2))
|
||||||
{
|
{
|
||||||
|
|
@ -492,6 +495,7 @@ static void R_AddLine(seg_t *line)
|
||||||
|
|
||||||
if (doorclosed)
|
if (doorclosed)
|
||||||
goto clipsolid;
|
goto clipsolid;
|
||||||
|
}
|
||||||
|
|
||||||
// Window.
|
// Window.
|
||||||
if (backc1 != frontc1 || backc2 != frontc2
|
if (backc1 != frontc1 || backc2 != frontc2
|
||||||
|
|
@ -502,6 +506,8 @@ static void R_AddLine(seg_t *line)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
|
if (thissec != backsector && thissec != frontsector)
|
||||||
{
|
{
|
||||||
if (backsector->ceilingheight <= frontsector->floorheight
|
if (backsector->ceilingheight <= frontsector->floorheight
|
||||||
|| backsector->floorheight >= frontsector->ceilingheight)
|
|| backsector->floorheight >= frontsector->ceilingheight)
|
||||||
|
|
@ -517,6 +523,7 @@ static void R_AddLine(seg_t *line)
|
||||||
|
|
||||||
if (doorclosed)
|
if (doorclosed)
|
||||||
goto clipsolid;
|
goto clipsolid;
|
||||||
|
}
|
||||||
|
|
||||||
// Window.
|
// Window.
|
||||||
if (backsector->ceilingheight != frontsector->ceilingheight
|
if (backsector->ceilingheight != frontsector->ceilingheight
|
||||||
|
|
|
||||||
|
|
@ -2020,6 +2020,8 @@ 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;
|
||||||
|
|
@ -2113,6 +2115,8 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
||||||
// ds_p->sprtopclip = screenheightarray;
|
// ds_p->sprtopclip = screenheightarray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (thissec != frontsector && thissec != backsector)
|
||||||
|
{
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
if (worldhigh <= worldbottom && worldhighslope <= worldbottomslope)
|
if (worldhigh <= worldbottom && worldhighslope <= worldbottomslope)
|
||||||
#else
|
#else
|
||||||
|
|
@ -2160,6 +2164,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
||||||
ds_p->silhouette |= SIL_TOP;
|
ds_p->silhouette |= SIL_TOP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (worldlow != worldbottom
|
if (worldlow != worldbottom
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue