diff --git a/src/r_main.c b/src/r_main.c index ab70a3ac..8c45be8b 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -586,7 +586,13 @@ void R_ExecuteSetViewSize (void) // psprite scales pspritescale = FixedDiv(viewwidth_nonwide, SCREENWIDTH); // killough 11/98 - pspriteiscale = FixedDiv(SCREENWIDTH, viewwidth_nonwide) + 1; // killough 11/98 + pspriteiscale = FixedDiv(SCREENWIDTH, viewwidth_nonwide); // killough 11/98 + + // [FG] make sure that the product of the weapon sprite scale factor + // and its reciprocal is always at least FRACUNIT to + // fix garbage lines at the top of weapon sprites + while (FixedMul(pspriteiscale, pspritescale) < FRACUNIT) + pspriteiscale++; skyiscale = FixedDiv(160 << FRACBITS, focallength);