From 3a3e9c70638cba077d337acf48e0995baa4fc2a9 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Tue, 4 Dec 2012 03:24:25 +0000 Subject: [PATCH] - Fixed: Flipping textures horizontally also flipped the scrolling direction. SVN r3976 (trunk) --- src/r_segs.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/r_segs.cpp b/src/r_segs.cpp index 07cd48691a..62c3e678a8 100644 --- a/src/r_segs.cpp +++ b/src/r_segs.cpp @@ -1850,6 +1850,10 @@ void R_RenderSegLoop () { rw_offset = rw_offset_mid; } + if (xscale < 0) + { + rw_offset = -rw_offset; + } if (rw_pic->GetHeight() != 1 << rw_pic->HeightBits) { wallscan_np2(x1, x2-1, walltop, wallbottom, swall, lwall, yscale, MAX(rw_frontcz1, rw_frontcz2), MIN(rw_frontfz1, rw_frontfz2), false); @@ -1889,6 +1893,10 @@ void R_RenderSegLoop () { rw_offset = rw_offset_top; } + if (xscale < 0) + { + rw_offset = -rw_offset; + } if (rw_pic->GetHeight() != 1 << rw_pic->HeightBits) { wallscan_np2(x1, x2-1, walltop, wallupper, swall, lwall, yscale, MAX(rw_frontcz1, rw_frontcz2), MIN(rw_backcz1, rw_backcz2), false); @@ -1931,6 +1939,10 @@ void R_RenderSegLoop () { rw_offset = rw_offset_bottom; } + if (xscale < 0) + { + rw_offset = -rw_offset; + } if (rw_pic->GetHeight() != 1 << rw_pic->HeightBits) { wallscan_np2(x1, x2-1, walllower, wallbottom, swall, lwall, yscale, MAX(rw_backfz1, rw_backfz2), MIN(rw_frontfz1, rw_frontfz2), false);