Made some FOF-related seg code account for slopes, as requested by some TODOs

The funny thing is you really can't see ANY change here unless you have a sloped FOF intersecting a sector floor/ceiling (and a second FOF on the other side), which has other problems anyway lol
This commit is contained in:
Monster Iestyn 2016-03-01 19:55:13 +00:00
parent 3802ec33de
commit 98fd5ca63b
1 changed files with 10 additions and 4 deletions

View File

@ -2121,8 +2121,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
for (r2 = frontsector->ffloors; r2; r2 = r2->next)
{
if (!(r2->flags & FF_EXISTS) || !(r2->flags & FF_RENDERSIDES)
|| *r2->topheight < lowcut || *r2->bottomheight > highcut) ///TODO: make these account for slopes -Red
if (!(r2->flags & FF_EXISTS) || !(r2->flags & FF_RENDERSIDES))
continue;
if (r2->norender == leveltime)
@ -2154,9 +2153,13 @@ void R_StoreWallRange(INT32 start, INT32 stop)
} else
low2 = lowslope2 = *r2->bottomheight;
if ((high2 < lowcut && highslope2 < lowcutslope) || (low2 > highcut && lowslope2 > highcutslope))
continue;
if ((high1 > high2 && highslope1 > highslope2) || (low1 < low2 && lowslope1 < lowslope2))
continue;
#else
if (*r2->topheight < lowcut || *r2->bottomheight > highcut)
continue;
if (*rover->topheight > *r2->topheight || *rover->bottomheight < *r2->bottomheight)
continue;
#endif
@ -2201,8 +2204,7 @@ void R_StoreWallRange(INT32 start, INT32 stop)
for (r2 = backsector->ffloors; r2; r2 = r2->next)
{
if (!(r2->flags & FF_EXISTS) || !(r2->flags & FF_RENDERSIDES)
|| *r2->topheight < lowcut || *r2->bottomheight > highcut) ///TODO: make these account for slopes -Red
if (!(r2->flags & FF_EXISTS) || !(r2->flags & FF_RENDERSIDES))
continue;
if (r2->norender == leveltime)
@ -2234,9 +2236,13 @@ void R_StoreWallRange(INT32 start, INT32 stop)
} else
low2 = lowslope2 = *r2->bottomheight;
if ((high2 < lowcut && highslope2 < lowcutslope) || (low2 > highcut && lowslope2 > highcutslope))
continue;
if ((high1 > high2 && highslope1 > highslope2) || (low1 < low2 && lowslope1 < lowslope2))
continue;
#else
if (*r2->topheight < lowcut || *r2->bottomheight > highcut)
continue;
if (*rover->topheight > *r2->topheight || *rover->bottomheight < *r2->bottomheight)
continue;
#endif