From 87ea75169e1b521d991b203484a44d56f5131eeb Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Sat, 29 Oct 2016 08:11:12 +0200 Subject: [PATCH] Fix texturefrac out of bounds bug --- src/r_things.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/r_things.cpp b/src/r_things.cpp index 523004772..a15921cba 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -258,9 +258,9 @@ void R_DrawMaskedColumn (const BYTE *column, const FTexture::Span *span, bool us const int top = span->TopOffset; // calculate unclipped screen coordinates for post - dc_yl = (int)(sprtopscreen + spryscale * top); - dc_yh = (int)(sprtopscreen + spryscale * (top + length)) - 1; - + dc_yl = (int)(sprtopscreen + spryscale * top + 0.5); + dc_yh = (int)(sprtopscreen + spryscale * (top + length) + 0.5) - 1; + if (sprflipvert) { swapvalues (dc_yl, dc_yh);