From c9d81dff53d4983ad4376fa9b1a47b0b05bab6e8 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Mon, 1 Feb 2016 21:02:32 -0600 Subject: [PATCH] Use absolute value of Y scale for 3D midtex - Somebody might want to set a midtexture's Y scale negative to flip it vertically. I'm pretty sure this would mess up 3D mid textures if we don't make it positive again for those. --- src/p_3dmidtex.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_3dmidtex.cpp b/src/p_3dmidtex.cpp index 3338956f3..5d5ba56d8 100644 --- a/src/p_3dmidtex.cpp +++ b/src/p_3dmidtex.cpp @@ -228,7 +228,7 @@ bool P_GetMidTexturePosition(const line_t *line, int sideno, fixed_t *ptextop, f FTexture * tex= TexMan(texnum); if (!tex) return false; - fixed_t totalscale = FixedMul(side->GetTextureYScale(side_t::mid), tex->yScale); + fixed_t totalscale = abs(FixedMul(side->GetTextureYScale(side_t::mid), tex->yScale)); fixed_t y_offset = side->GetTextureYOffset(side_t::mid); fixed_t textureheight = tex->GetScaledHeight(totalscale) << FRACBITS; if (totalscale != FRACUNIT && !tex->bWorldPanning)