`// if this doesn't work i'm removing papersprites`

(check both the left and right side overflow of the sprite column being drawn)
This commit is contained in:
toaster 2018-09-09 13:47:19 +01:00
parent 86d4eb9655
commit dc0144540b
1 changed files with 4 additions and 4 deletions

View File

@ -920,7 +920,7 @@ static void R_DrawVisSprite(vissprite_t *vis)
if (vis->scalestep) // currently papersprites only
{
#ifndef RANGECHECK
if ((frac>>FRACBITS) >= SHORT(patch->width)) // slower but kills intermittent crashes...
if ((frac>>FRACBITS) < 0 || (frac>>FRACBITS) >= SHORT(patch->width)) // if this doesn't work i'm removing papersprites
break;
#endif
sprtopscreen = (centeryfrac - FixedMul(dc_texturemid, spryscale));
@ -1271,6 +1271,9 @@ static void R_ProjectSprite(mobj_t *thing)
{
fixed_t yscale2, cosmul, sinmul, tz2;
if (x2 <= x1)
return;
if (ang >= ANGLE_180)
{
offset *= -1;
@ -1299,9 +1302,6 @@ static void R_ProjectSprite(mobj_t *thing)
if (max(tz, tz2) < FixedMul(MINZ, this_scale)) // non-papersprite clipping is handled earlier
return;
if (x2 <= x1)
return;
scalestep = (yscale2 - yscale)/(x2 - x1);
// The following two are alternate sorting methods which might be more applicable in some circumstances. TODO - maybe enable via MF2?