From e0515c3209dc8c0ca170d0fa28bba6efebb3c375 Mon Sep 17 00:00:00 2001 From: biwa <6475593+biwa@users.noreply.github.com> Date: Sun, 4 Jul 2021 10:51:05 +0200 Subject: [PATCH] Visual Mode: fixed a bug where auto-aligning textures wouldn't work correctly in game configurations without support for local sidedef texture offsets, when short texture names were used, but the texture's source was a full texture name (i.e. from the /textures directory) --- .../VisualModes/BaseVisualMode.cs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs index 2d8d7eae7..65d36f211 100755 --- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs +++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs @@ -4636,8 +4636,25 @@ namespace CodeImp.DoomBuilder.BuilderModes first.controlSide = start.Sidedef; } - //mxd + // We potentially need to deal with 2 textures (because of long and short texture names). This is even important + // for classic texture alignments, since for example Eternity Engine doesn't support local sidedef texture offsets, + // but full texture names from a /textures directory HashSet<long> texturehashes = new HashSet<long> { texture.LongName }; + switch (start.GeometryType) + { + case VisualGeometryType.WALL_LOWER: + texturehashes.Add(first.controlSide.LongLowTexture); + break; + + case VisualGeometryType.WALL_MIDDLE: + case VisualGeometryType.WALL_MIDDLE_3D: + texturehashes.Add(first.controlSide.LongMiddleTexture); + break; + + case VisualGeometryType.WALL_UPPER: + texturehashes.Add(first.controlSide.LongHighTexture); + break; + } first.forward = true; todo.Push(first); -- GitLab