Skip drawing invalid polygons in polymost_drawpoly()

git-svn-id: https://svn.eduke32.com/eduke32@7880 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2019-08-04 02:52:06 +00:00 committed by Christoph Oelckers
parent e9e9067251
commit 7553bb043f

View file

@ -2121,6 +2121,8 @@ static void polymost_drawpoly(vec2f_t const * const dpxy, int32_t const n, int32
py[j] = dpxy[i].y;
dd[j] = (dpxy[i].x * xtex.d + dpxy[i].y * ytex.d + otex.d);
if (dd[j] <= 0.f) // invalid polygon
return;
uu[j] = (dpxy[i].x * xtex.u + dpxy[i].y * ytex.u + otex.u);
vv[j] = (dpxy[i].x * xtex.v + dpxy[i].y * ytex.v + otex.v);
j++;