Fixed a bug where pasting texture offsets in UDMF configurations without support for local sidedef texture offset (like the Eternity UDMF configuration) didn't work. Fixes #538

This commit is contained in:
biwa 2021-03-16 21:44:12 +01:00
parent 2abcbfffab
commit a99d5c239b

View file

@ -1255,7 +1255,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public virtual void OnPasteTextureOffsets()
{
mode.CreateUndo("Paste texture offsets");
if(General.Map.UDMF)
if(General.Map.UDMF && General.Map.Config.UseLocalSidedefTextureOffsets)
{
SetTextureOffsetX(BuilderPlug.Me.CopiedOffsets.X);
SetTextureOffsetY(BuilderPlug.Me.CopiedOffsets.Y);
@ -1298,7 +1298,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
public virtual void OnCopyTextureOffsets()
{
//mxd
BuilderPlug.Me.CopiedOffsets = General.Map.UDMF ? GetTextureOffset() : new Point(Sidedef.OffsetX, Sidedef.OffsetY);
BuilderPlug.Me.CopiedOffsets = (General.Map.UDMF && General.Map.Config.UseLocalSidedefTextureOffsets) ? GetTextureOffset() : new Point(Sidedef.OffsetX, Sidedef.OffsetY);
mode.SetActionResult("Copied texture offsets " + BuilderPlug.Me.CopiedOffsets.X + ", " + BuilderPlug.Me.CopiedOffsets.Y + ".");
}