From f373752b4fd9d8e14f4e9092121153e84edcbbca Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 14 Dec 2018 19:59:19 +0100 Subject: [PATCH] - fixed incorrect alignment of scaled world panned textures combined with per-sidedef scaling in the hardware renderer This particular case incorrectly factored in the sidedef's scaling factor for how to calculate the offset. Fortunately this is a very rare case - a quick check yielded no maps depending on it. Should any map surface that depends on this bug a compatibility option may be needed but it doesn't seem likely that this may be the case. --- src/textures/texture.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/textures/texture.cpp b/src/textures/texture.cpp index 85b57798df1..bd2b8705491 100644 --- a/src/textures/texture.cpp +++ b/src/textures/texture.cpp @@ -1576,7 +1576,7 @@ float FTexCoordInfo::RowOffset(float rowoffset) const } else { - if (mWorldPanning) return rowoffset / tscale; + if (mWorldPanning) return rowoffset; else return rowoffset / scale; } } @@ -1598,7 +1598,7 @@ float FTexCoordInfo::TextureOffset(float textureoffset) const } else { - if (mWorldPanning) return textureoffset / tscale; + if (mWorldPanning) return textureoffset; else return textureoffset / scale; } }