diff --git a/Source/Plugins/GZDoomEditing/VisualModes/BaseVisualGeometrySector.cs b/Source/Plugins/GZDoomEditing/VisualModes/BaseVisualGeometrySector.cs index 4b16dfe82328f78783a5e3676ad20d045bbee92e..91264bc68247f006a8b27db9f680b7de9790f2dc 100644 --- a/Source/Plugins/GZDoomEditing/VisualModes/BaseVisualGeometrySector.cs +++ b/Source/Plugins/GZDoomEditing/VisualModes/BaseVisualGeometrySector.cs @@ -273,8 +273,6 @@ namespace CodeImp.DoomBuilder.GZDoomEditing mode.Renderer.ShowSelection = false; mode.Renderer.ShowHighlight = false; UpdateDragUV(); - } else { - General.ShowErrorMessage(BaseVisualMode.TEXTURE_OFFSET_CHANGE_ERROR, MessageBoxButtons.OK); } } } @@ -488,17 +486,22 @@ namespace CodeImp.DoomBuilder.GZDoomEditing // Texture offset change public virtual void OnChangeTextureOffset(int horizontal, int vertical) { - if((General.Map.UndoRedo.NextUndo == null) || (General.Map.UndoRedo.NextUndo.TicketID != undoticket)) - undoticket = mode.CreateUndo("Change texture offsets"); + //mxd + if (General.Map.UDMF) { + if ((General.Map.UndoRedo.NextUndo == null) || (General.Map.UndoRedo.NextUndo.TicketID != undoticket)) + undoticket = mode.CreateUndo("Change texture offsets"); - // Apply offsets - MoveTextureOffset(new Point(-horizontal, -vertical)); + // Apply offsets + MoveTextureOffset(new Point(-horizontal, -vertical)); - mode.SetActionResult("Changed texture offsets by " + -horizontal + ", " + -vertical + "."); + mode.SetActionResult("Changed texture offsets by " + -horizontal + ", " + -vertical + "."); - // Update sector geometry - Sector.UpdateSectorGeometry(false); - Sector.Rebuild(); + // Update sector geometry + Sector.UpdateSectorGeometry(false); + Sector.Rebuild(); + } else { + General.ShowErrorMessage("Floor/ceiling texture offsets cannot be changed in this map format!", MessageBoxButtons.OK); + } } #endregion diff --git a/Source/Plugins/GZDoomEditing/VisualModes/BaseVisualGeometrySidedef.cs b/Source/Plugins/GZDoomEditing/VisualModes/BaseVisualGeometrySidedef.cs index 9794dc4758195260c70c52774b38156b3bb8e033..aa79c867cbf1d55ac7879560c322a2ea668cdbad 100644 --- a/Source/Plugins/GZDoomEditing/VisualModes/BaseVisualGeometrySidedef.cs +++ b/Source/Plugins/GZDoomEditing/VisualModes/BaseVisualGeometrySidedef.cs @@ -869,18 +869,14 @@ namespace CodeImp.DoomBuilder.GZDoomEditing float deltaz = General.Map.VisualCamera.AngleZ - dragstartanglez; if((Math.Abs(deltaxy) + Math.Abs(deltaz)) > DRAG_ANGLE_TOLERANCE) { - if(General.Map.UDMF) { //mxd - mode.PreAction(UndoGroup.TextureOffsetChange); - mode.CreateUndo("Change texture offsets"); - - // Start drag now - uvdragging = true; - mode.Renderer.ShowSelection = false; - mode.Renderer.ShowHighlight = false; - UpdateDragUV(); - } else { - General.ShowErrorMessage(BaseVisualMode.TEXTURE_OFFSET_CHANGE_ERROR, MessageBoxButtons.OK); - } + mode.PreAction(UndoGroup.TextureOffsetChange); + mode.CreateUndo("Change texture offsets"); + + // Start drag now + uvdragging = true; + mode.Renderer.ShowSelection = false; + mode.Renderer.ShowHighlight = false; + UpdateDragUV(); } } } @@ -957,10 +953,18 @@ namespace CodeImp.DoomBuilder.GZDoomEditing if((General.Map.UndoRedo.NextUndo == null) || (General.Map.UndoRedo.NextUndo.TicketID != undoticket)) undoticket = mode.CreateUndo("Change texture offsets"); - // Apply offsets - MoveTextureOffset(new Point(-horizontal, -vertical)); - - mode.SetActionResult("Changed texture offsets by " + -horizontal + ", " + -vertical + "."); + //mxd + if (General.Map.UDMF) { + // Apply UDMF offsets + MoveTextureOffset(new Point(-horizontal, -vertical)); + Point p = GetTextureOffset(); + mode.SetActionResult("Changed texture offsets to " + p.X + ", " + p.Y + "."); + } else { + // Apply classic offsets + Sidedef.OffsetX -= horizontal; + Sidedef.OffsetY -= vertical; + mode.SetActionResult("Changed texture offsets to " + Sidedef.OffsetX + ", " + Sidedef.OffsetY + "."); + } // Update sidedef geometry VisualSidedefParts parts = Sector.GetSidedefParts(Sidedef); diff --git a/Source/Plugins/GZDoomEditing/VisualModes/BaseVisualMode.cs b/Source/Plugins/GZDoomEditing/VisualModes/BaseVisualMode.cs index 4fdb39c23d19be651030a55ffe4b296a95118ee0..dbc75271bb3ef023e21eefe620b52defcc8bc0d0 100644 --- a/Source/Plugins/GZDoomEditing/VisualModes/BaseVisualMode.cs +++ b/Source/Plugins/GZDoomEditing/VisualModes/BaseVisualMode.cs @@ -50,9 +50,6 @@ namespace CodeImp.DoomBuilder.GZDoomEditing public class BaseVisualMode : VisualMode { #region ================== Constants - //mxd - public const string TEXTURE_OFFSET_CHANGE_ERROR = "Texture offsets cannot be changed in this mode if the map is not in UDMF format.\nPlease use Visual mode to change them."; - // Object picking private const float PICK_INTERVAL = 80.0f; private const float PICK_RANGE = 0.98f; @@ -1431,105 +1428,73 @@ namespace CodeImp.DoomBuilder.GZDoomEditing [BeginAction("movetextureleft", Library = "BuilderModes")] public void MoveTextureLeft1() { - if(General.Map.UDMF) { - PreAction(UndoGroup.TextureOffsetChange); - List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true); - foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(-1, 0); - PostAction(); - } else { - General.ShowErrorMessage(TEXTURE_OFFSET_CHANGE_ERROR, MessageBoxButtons.OK); - } + PreAction(UndoGroup.TextureOffsetChange); + List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true); + foreach (IVisualEventReceiver i in objs) i.OnChangeTextureOffset(-1, 0); + PostAction(); } [BeginAction("movetextureright", Library = "BuilderModes")] public void MoveTextureRight1() { - if(General.Map.UDMF) { - PreAction(UndoGroup.TextureOffsetChange); - List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true); - foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(1, 0); - PostAction(); - } else { - General.ShowErrorMessage(TEXTURE_OFFSET_CHANGE_ERROR, MessageBoxButtons.OK); - } + PreAction(UndoGroup.TextureOffsetChange); + List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true); + foreach (IVisualEventReceiver i in objs) i.OnChangeTextureOffset(1, 0); + PostAction(); } [BeginAction("movetextureup", Library = "BuilderModes")] public void MoveTextureUp1() { - if(General.Map.UDMF) { - PreAction(UndoGroup.TextureOffsetChange); - List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true); - foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(0, -1); - PostAction(); - } else { - General.ShowErrorMessage(TEXTURE_OFFSET_CHANGE_ERROR, MessageBoxButtons.OK); - } + PreAction(UndoGroup.TextureOffsetChange); + List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true); + foreach (IVisualEventReceiver i in objs) i.OnChangeTextureOffset(0, -1); + PostAction(); } [BeginAction("movetexturedown", Library = "BuilderModes")] public void MoveTextureDown1() { - if(General.Map.UDMF) { - PreAction(UndoGroup.TextureOffsetChange); - List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true); - foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(0, 1); - PostAction(); - } else { - General.ShowErrorMessage(TEXTURE_OFFSET_CHANGE_ERROR, MessageBoxButtons.OK); - } + PreAction(UndoGroup.TextureOffsetChange); + List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true); + foreach (IVisualEventReceiver i in objs) i.OnChangeTextureOffset(0, 1); + PostAction(); } [BeginAction("movetextureleft8", Library = "BuilderModes")] public void MoveTextureLeft8() { - if(General.Map.UDMF) { - PreAction(UndoGroup.TextureOffsetChange); - List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true); - foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(-8, 0); - PostAction(); - } else { - General.ShowErrorMessage(TEXTURE_OFFSET_CHANGE_ERROR, MessageBoxButtons.OK); - } + PreAction(UndoGroup.TextureOffsetChange); + List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true); + foreach (IVisualEventReceiver i in objs) i.OnChangeTextureOffset(-8, 0); + PostAction(); } [BeginAction("movetextureright8", Library = "BuilderModes")] public void MoveTextureRight8() { - if(General.Map.UDMF) { - PreAction(UndoGroup.TextureOffsetChange); - List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true); - foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(8, 0); - PostAction(); - } else { - General.ShowErrorMessage(TEXTURE_OFFSET_CHANGE_ERROR, MessageBoxButtons.OK); - } + PreAction(UndoGroup.TextureOffsetChange); + List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true); + foreach (IVisualEventReceiver i in objs) i.OnChangeTextureOffset(8, 0); + PostAction(); } [BeginAction("movetextureup8", Library = "BuilderModes")] public void MoveTextureUp8() { - if(General.Map.UDMF) { - PreAction(UndoGroup.TextureOffsetChange); - List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true); - foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(0, -8); - PostAction(); - } else { - General.ShowErrorMessage(TEXTURE_OFFSET_CHANGE_ERROR, MessageBoxButtons.OK); - } + PreAction(UndoGroup.TextureOffsetChange); + List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true); + foreach (IVisualEventReceiver i in objs) i.OnChangeTextureOffset(0, -8); + PostAction(); } [BeginAction("movetexturedown8", Library = "BuilderModes")] public void MoveTextureDown8() { - if(General.Map.UDMF) { - PreAction(UndoGroup.TextureOffsetChange); - List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true); - foreach(IVisualEventReceiver i in objs) i.OnChangeTextureOffset(0, 8); - PostAction(); - } else { - General.ShowErrorMessage(TEXTURE_OFFSET_CHANGE_ERROR, MessageBoxButtons.OK); - } + PreAction(UndoGroup.TextureOffsetChange); + List<IVisualEventReceiver> objs = GetSelectedObjects(true, true, true); + foreach (IVisualEventReceiver i in objs) i.OnChangeTextureOffset(0, 8); + PostAction(); } [BeginAction("textureselect", Library = "BuilderModes")] diff --git a/Source/Plugins/GZDoomEditing/VisualModes/VisualFloor.cs b/Source/Plugins/GZDoomEditing/VisualModes/VisualFloor.cs index edbbfe9b57b9487e0814f33a8b41755295d07848..437764b907406e52624eb477921e3fb2e60d2d3b 100644 --- a/Source/Plugins/GZDoomEditing/VisualModes/VisualFloor.cs +++ b/Source/Plugins/GZDoomEditing/VisualModes/VisualFloor.cs @@ -175,13 +175,6 @@ namespace CodeImp.DoomBuilder.GZDoomEditing s.Fields["xpanningfloor"] = new UniValue(UniversalType.Float, oldx + (float)xy.X); s.Fields["ypanningfloor"] = new UniValue(UniversalType.Float, oldy + (float)xy.Y); s.UpdateNeeded = true; - - /*Sector.Sector.Fields.BeforeFieldsChange(); - float oldx = Sector.Sector.Fields.GetValue("xpanningfloor", 0.0f); - float oldy = Sector.Sector.Fields.GetValue("ypanningfloor", 0.0f); - Sector.Sector.Fields["xpanningfloor"] = new UniValue(UniversalType.Float, oldx + (float)xy.X); - Sector.Sector.Fields["ypanningfloor"] = new UniValue(UniversalType.Float, oldy + (float)xy.Y); - Sector.Sector.UpdateNeeded = true;*/ } // Paste texture diff --git a/Source/Plugins/GZDoomEditing/VisualModes/VisualLower.cs b/Source/Plugins/GZDoomEditing/VisualModes/VisualLower.cs index f0dd8b24c2da3e952a18f8e086a62a1e080febba..d290480942e099b1012e9b3d40f1623af268a004 100644 --- a/Source/Plugins/GZDoomEditing/VisualModes/VisualLower.cs +++ b/Source/Plugins/GZDoomEditing/VisualModes/VisualLower.cs @@ -240,10 +240,6 @@ namespace CodeImp.DoomBuilder.GZDoomEditing float scaley = Sidedef.Fields.GetValue("scaley_bottom", 1.0f); Sidedef.Fields["offsetx_bottom"] = new UniValue(UniversalType.Float, getRoundedTextureOffset(oldx, (float)xy.X, scalex)); //mxd Sidedef.Fields["offsety_bottom"] = new UniValue(UniversalType.Float, getRoundedTextureOffset(oldy, (float)xy.Y, scaley)); //mxd - //Sidedef.Fields["offsetx_bottom"] = new UniValue(UniversalType.Float, oldx + getRoundedTextureOffset((float)xy.X, scalex)); //mxd - //Sidedef.Fields["offsety_bottom"] = new UniValue(UniversalType.Float, oldy + getRoundedTextureOffset((float)xy.Y, scaley)); //mxd - //Sidedef.Fields["offsetx_bottom"] = new UniValue(UniversalType.Float, oldx + (float)xy.X * scalex); - //Sidedef.Fields["offsety_bottom"] = new UniValue(UniversalType.Float, oldy + (float)xy.Y * scaley); } protected override Point GetTextureOffset() diff --git a/Source/Plugins/GZDoomEditing/VisualModes/VisualMiddle3D.cs b/Source/Plugins/GZDoomEditing/VisualModes/VisualMiddle3D.cs index cc3a36e31d9ce7901f22aaee5ffd4441311a73ad..e218905cdf500a4da77b7254abd6e04c81dcd976 100644 --- a/Source/Plugins/GZDoomEditing/VisualModes/VisualMiddle3D.cs +++ b/Source/Plugins/GZDoomEditing/VisualModes/VisualMiddle3D.cs @@ -76,9 +76,6 @@ namespace CodeImp.DoomBuilder.GZDoomEditing Sidedef sourceside = extrafloor.Linedef.Front; this.extrafloor = extrafloor; - //int lightvalue = Sidedef.Fields.GetValue("light", 0); - //bool lightabsolute = Sidedef.Fields.GetValue("lightabsolute", false); - //mxd. lightfog flag support bool lightabsolute = Sidedef.Fields.GetValue("lightabsolute", false); bool ignoreUDMFLight = (!Sidedef.Fields.GetValue("lightfog", false) || !lightabsolute) && Sector.Sector.Fields.ContainsKey("fadecolor"); @@ -197,7 +194,6 @@ namespace CodeImp.DoomBuilder.GZDoomEditing // Determine initial color int lightlevel = lightabsolute ? lightvalue : sd.Ceiling.brightnessbelow + lightvalue; //mxd. This calculates light with doom-style wall shading - //PixelColor wallbrightness = PixelColor.FromInt(mode.CalculateBrightness(lightlevel)); PixelColor wallbrightness = PixelColor.FromInt(mode.CalculateBrightness(lightlevel, Sidedef)); PixelColor wallcolor = PixelColor.Modulate(sd.Ceiling.colorbelow, wallbrightness); poly.color = wallcolor.WithAlpha(255).ToInt(); diff --git a/Source/Plugins/GZDoomEditing/VisualModes/VisualMiddleDouble.cs b/Source/Plugins/GZDoomEditing/VisualModes/VisualMiddleDouble.cs index 316e2739b2604d2f2865c26c29350723badfa8dd..2927d68fe455fe8479ee31b4ea02e306f9dddeba 100644 --- a/Source/Plugins/GZDoomEditing/VisualModes/VisualMiddleDouble.cs +++ b/Source/Plugins/GZDoomEditing/VisualModes/VisualMiddleDouble.cs @@ -77,9 +77,6 @@ namespace CodeImp.DoomBuilder.GZDoomEditing public override bool Setup() { Vector2D vl, vr; - - //int lightvalue = Sidedef.Fields.GetValue("light", 0); - //bool lightabsolute = Sidedef.Fields.GetValue("lightabsolute", false); //mxd. lightfog flag support bool lightabsolute = Sidedef.Fields.GetValue("lightabsolute", false); @@ -194,7 +191,6 @@ namespace CodeImp.DoomBuilder.GZDoomEditing // Determine initial color int lightlevel = lightabsolute ? lightvalue : sd.Ceiling.brightnessbelow + lightvalue; //mxd - //PixelColor wallbrightness = PixelColor.FromInt(mode.CalculateBrightness(lightlevel)); PixelColor wallbrightness = PixelColor.FromInt(mode.CalculateBrightness(lightlevel, Sidedef)); PixelColor wallcolor = PixelColor.Modulate(sd.Ceiling.colorbelow, wallbrightness); poly.color = wallcolor.WithAlpha(255).ToInt(); @@ -317,10 +313,6 @@ namespace CodeImp.DoomBuilder.GZDoomEditing float scaley = Sidedef.Fields.GetValue("scaley_mid", 1.0f); Sidedef.Fields["offsetx_mid"] = new UniValue(UniversalType.Float, getRoundedTextureOffset(oldx, (float)xy.X, scalex)); //mxd Sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, getRoundedTextureOffset(oldy, (float)xy.Y, scaley)); //mxd - //Sidedef.Fields["offsetx_mid"] = new UniValue(UniversalType.Float, oldx + getRoundedTextureOffset((float)xy.X, scalex)); //mxd - //Sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, oldy + getRoundedTextureOffset((float)xy.Y, scaley)); //mxd - //Sidedef.Fields["offsetx_mid"] = new UniValue(UniversalType.Float, oldx + (float)xy.X * scalex); - //Sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, oldy + (float)xy.Y * scaley); } protected override Point GetTextureOffset() diff --git a/Source/Plugins/GZDoomEditing/VisualModes/VisualMiddleSingle.cs b/Source/Plugins/GZDoomEditing/VisualModes/VisualMiddleSingle.cs index ab0a650698354d4ce6d1020812bac978e54229d2..355f30d5ec06896f712c27058345304576f7eafc 100644 --- a/Source/Plugins/GZDoomEditing/VisualModes/VisualMiddleSingle.cs +++ b/Source/Plugins/GZDoomEditing/VisualModes/VisualMiddleSingle.cs @@ -70,9 +70,6 @@ namespace CodeImp.DoomBuilder.GZDoomEditing public override bool Setup() { Vector2D vl, vr; - - //int lightvalue = Sidedef.Fields.GetValue("light", 0); - //bool lightabsolute = Sidedef.Fields.GetValue("lightabsolute", false); //mxd. lightfog flag support bool lightabsolute = Sidedef.Fields.GetValue("lightabsolute", false); @@ -189,7 +186,6 @@ namespace CodeImp.DoomBuilder.GZDoomEditing // Determine initial color int lightlevel = lightabsolute ? lightvalue : sd.Ceiling.brightnessbelow + lightvalue; //mxd - //PixelColor wallbrightness = PixelColor.FromInt(mode.CalculateBrightness(lightlevel)); PixelColor wallbrightness = PixelColor.FromInt(mode.CalculateBrightness(lightlevel, Sidedef)); PixelColor wallcolor = PixelColor.Modulate(sd.Ceiling.colorbelow, wallbrightness); poly.color = wallcolor.WithAlpha(255).ToInt(); @@ -245,10 +241,6 @@ namespace CodeImp.DoomBuilder.GZDoomEditing float scaley = Sidedef.Fields.GetValue("scaley_mid", 1.0f); Sidedef.Fields["offsetx_mid"] = new UniValue(UniversalType.Float, getRoundedTextureOffset(oldx, (float)xy.X, scalex)); //mxd Sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, getRoundedTextureOffset(oldy, (float)xy.Y, scaley)); //mxd - //Sidedef.Fields["offsetx_mid"] = new UniValue(UniversalType.Float, oldx + getRoundedTextureOffset((float)xy.X, scalex)); //mxd - //Sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, oldy + getRoundedTextureOffset((float)xy.Y, scaley)); //mxd - //Sidedef.Fields["offsetx_mid"] = new UniValue(UniversalType.Float, oldx + (float)xy.X * scalex); - //Sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, oldy + (float)xy.Y * scaley); } protected override Point GetTextureOffset() diff --git a/Source/Plugins/GZDoomEditing/VisualModes/VisualUpper.cs b/Source/Plugins/GZDoomEditing/VisualModes/VisualUpper.cs index 2d224237c132e57b5814cd5e36d4f881d756a03f..63aaef03bfc5da35bb53fc590ceabbb9d3dad808 100644 --- a/Source/Plugins/GZDoomEditing/VisualModes/VisualUpper.cs +++ b/Source/Plugins/GZDoomEditing/VisualModes/VisualUpper.cs @@ -71,9 +71,6 @@ namespace CodeImp.DoomBuilder.GZDoomEditing public override bool Setup() { Vector2D vl, vr; - - //int lightvalue = Sidedef.Fields.GetValue("light", 0); - //bool lightabsolute = Sidedef.Fields.GetValue("lightabsolute", false); //mxd. lightfog flag support bool lightabsolute = Sidedef.Fields.GetValue("lightabsolute", false); @@ -179,7 +176,6 @@ namespace CodeImp.DoomBuilder.GZDoomEditing // Determine initial color int lightlevel = lightabsolute ? lightvalue : sd.Ceiling.brightnessbelow + lightvalue; //mxd - //PixelColor wallbrightness = PixelColor.FromInt(mode.CalculateBrightness(lightlevel)); PixelColor wallbrightness = PixelColor.FromInt(mode.CalculateBrightness(lightlevel, Sidedef)); PixelColor wallcolor = PixelColor.Modulate(sd.Ceiling.colorbelow, wallbrightness); poly.color = wallcolor.WithAlpha(255).ToInt(); @@ -244,10 +240,6 @@ namespace CodeImp.DoomBuilder.GZDoomEditing float scaley = Sidedef.Fields.GetValue("scaley_top", 1.0f); Sidedef.Fields["offsetx_top"] = new UniValue(UniversalType.Float, getRoundedTextureOffset(oldx, (float)xy.X, scalex)); //mxd Sidedef.Fields["offsety_top"] = new UniValue(UniversalType.Float, getRoundedTextureOffset(oldy, (float)xy.Y, scaley)); //mxd - //Sidedef.Fields["offsetx_top"] = new UniValue(UniversalType.Float, oldx + getRoundedTextureOffset((float)xy.X, scalex)); //mxd - //Sidedef.Fields["offsety_top"] = new UniValue(UniversalType.Float, oldy + getRoundedTextureOffset((float)xy.Y, scaley)); //mxd - //Sidedef.Fields["offsetx_top"] = new UniValue(UniversalType.Float, oldx + (float)xy.X * scalex); - //Sidedef.Fields["offsety_top"] = new UniValue(UniversalType.Float, oldy + (float)xy.Y * scaley); } protected override Point GetTextureOffset()