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
parent 97107b6b6d
commit 2a4a61d4d0

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;
}