Patch from Nuke.YKT to clip bunches to screen boundaries in Polymost

git-svn-id: https://svn.eduke32.com/eduke32@7844 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2019-07-26 21:54:41 +00:00 committed by Christoph Oelckers
parent 47fa1eccd4
commit ee92304087

View file

@ -5038,6 +5038,15 @@ void polymost_scansector(int32_t sectnum)
dxb1[numscans] = (p1.y >= SCISDIST) ? float(p1.x*ghalfx/p1.y + ghalfx) : -1e32f;
dxb2[numscans] = (p2.y >= SCISDIST) ? float(p2.x*ghalfx/p2.y + ghalfx) : 1e32f;
if (dxb1[numscans] < xbl)
dxb1[numscans] = xbl;
else if (dxb1[numscans] > xbr)
dxb1[numscans] = xbr;
if (dxb2[numscans] < xbl)
dxb2[numscans] = xbl;
else if (dxb2[numscans] > xbr)
dxb2[numscans] = xbr;
if (nexttowardf(dxb1[numscans], dxb2[numscans]) < dxb2[numscans])
{
thesector[numscans] = sectnum;