Fix divide by zero if yscale is too small a number

This commit is contained in:
Magnus Norddahl 2016-10-14 15:23:23 +02:00 committed by Christoph Oelckers
parent 657abb374b
commit 36aff68501

View file

@ -408,7 +408,7 @@ void R_DrawVisSprite (vissprite_t *vis)
ESPSResult mode;
bool ispsprite = (!vis->sector && vis->gpos != FVector3(0, 0, 0));
if (vis->xscale == 0 || vis->yscale == 0)
if (vis->xscale == 0 || fabs(vis->yscale) < (1.0f / 32000.0f))
{ // scaled to 0; can't see
return;
}