From dc0144540b55ef12d196824150395bb5d88f4a74 Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 9 Sep 2018 13:47:19 +0100 Subject: [PATCH] `// if this doesn't work i'm removing papersprites` (check both the left and right side overflow of the sprite column being drawn) --- src/r_things.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/r_things.c b/src/r_things.c index 6166c762..7f6e3974 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -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?