From 0469592bf5e1f4d8088d8169af8505f815704862 Mon Sep 17 00:00:00 2001 From: MaxED Date: Fri, 6 Sep 2013 07:55:02 +0000 Subject: [PATCH] "Copy Texture Offsets" and "Paste Texture Offsets" actions now work in Doom and Hexen map formats. --- .../VisualModes/BaseVisualGeometrySidedef.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs index ccab54a7..789c79a6 100644 --- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs +++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualGeometrySidedef.cs @@ -846,8 +846,13 @@ namespace CodeImp.DoomBuilder.BuilderModes public virtual void OnPasteTextureOffsets() { mode.CreateUndo("Paste texture offsets"); - SetTextureOffsetX(BuilderPlug.Me.CopiedOffsets.X); - SetTextureOffsetY(BuilderPlug.Me.CopiedOffsets.Y); + if (General.Map.UDMF) { + SetTextureOffsetX(BuilderPlug.Me.CopiedOffsets.X); + SetTextureOffsetY(BuilderPlug.Me.CopiedOffsets.Y); + } else { + Sidedef.OffsetX = BuilderPlug.Me.CopiedOffsets.X; + Sidedef.OffsetY = BuilderPlug.Me.CopiedOffsets.Y; + } mode.SetActionResult("Pasted texture offsets " + BuilderPlug.Me.CopiedOffsets.X + ", " + BuilderPlug.Me.CopiedOffsets.Y + "."); // Update sidedef geometry @@ -866,7 +871,8 @@ namespace CodeImp.DoomBuilder.BuilderModes // Copy texture offsets public virtual void OnCopyTextureOffsets() { - BuilderPlug.Me.CopiedOffsets = GetTextureOffset(); + //mxd + BuilderPlug.Me.CopiedOffsets = General.Map.UDMF ? GetTextureOffset() : new Point(Sidedef.OffsetX, Sidedef.OffsetY); mode.SetActionResult("Copied texture offsets " + BuilderPlug.Me.CopiedOffsets.X + ", " + BuilderPlug.Me.CopiedOffsets.Y + "."); }