From 77bed468a12f113a04058fee5b5df3381e82a995 Mon Sep 17 00:00:00 2001 From: sphere Date: Mon, 25 Oct 2021 20:43:49 +0200 Subject: [PATCH] Visual Mode: Invert Lower Unpegged behavior for non-skewed FOFs to match SRB2. --- .../Plugins/BuilderModes/VisualModes/VisualMiddle3D.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/Plugins/BuilderModes/VisualModes/VisualMiddle3D.cs b/Source/Plugins/BuilderModes/VisualModes/VisualMiddle3D.cs index ffd963f..6dddb68 100644 --- a/Source/Plugins/BuilderModes/VisualModes/VisualMiddle3D.cs +++ b/Source/Plugins/BuilderModes/VisualModes/VisualMiddle3D.cs @@ -174,10 +174,11 @@ namespace CodeImp.DoomBuilder.BuilderModes tlt.x = tlb.x = 0; trt.x = trb.x = Sidedef.Line.Length; - tlt.y = IsLowerUnpegged() ? 0 : -(topheight - bottomheight); - trt.y = IsLowerUnpegged() ? 0 : -(topheight2 - bottomheight2); - tlb.y = !IsLowerUnpegged() ? 0 : (topheight - bottomheight); - trb.y = !IsLowerUnpegged() ? 0 : (topheight2 - bottomheight2); + // For SRB2, invert Lower Unpegged behavior for non-skewed 3D floors + tlt.y = !(IsLowerUnpegged() ^ skew) ? 0 : -(topheight - bottomheight); + trt.y = !(IsLowerUnpegged() ^ skew) ? 0 : -(topheight2 - bottomheight2); + tlb.y = !(!IsLowerUnpegged() ^ skew) ? 0 : (topheight - bottomheight); + trb.y = !(!IsLowerUnpegged() ^ skew) ? 0 : (topheight2 - bottomheight2); // Apply texture offset tlt += tof;