From 0654cec0754e27b8647225d483ec431b4cc8de08 Mon Sep 17 00:00:00 2001 From: MaxED Date: Fri, 8 Nov 2013 08:18:33 +0000 Subject: [PATCH] Visual mode, auto align textures: actually, it won't break anything if we vertical clamp texture offsets of a 3d floor sidedef while auto-aligning (this reverts a part of previous commit)... Classic modes: event lines are drawn once again while panning the view (I've disabled this a while ago trying to fix performance problems in Classic modes). --- Source/Plugins/BuilderModes/ClassicModes/LinedefsMode.cs | 6 +++--- Source/Plugins/BuilderModes/ClassicModes/SectorsMode.cs | 6 +++--- Source/Plugins/BuilderModes/ClassicModes/ThingsMode.cs | 6 ++---- Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs | 2 +- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Source/Plugins/BuilderModes/ClassicModes/LinedefsMode.cs b/Source/Plugins/BuilderModes/ClassicModes/LinedefsMode.cs index 0fa72c0a..fc962ce5 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/LinedefsMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/LinedefsMode.cs @@ -321,11 +321,11 @@ namespace CodeImp.DoomBuilder.BuilderModes if(renderer.StartPlotter(true)) { renderer.PlotLinedefSet(General.Map.Map.Linedefs); - if(!panning) //mxd - for(int i = 0; i < Linedef.NUM_ARGS; i++) BuilderPlug.Me.PlotAssociations(renderer, association[i]); + for(int i = 0; i < Linedef.NUM_ARGS; i++) BuilderPlug.Me.PlotAssociations(renderer, association[i]); + if((highlighted != null) && !highlighted.IsDisposed) { - if(!panning) BuilderPlug.Me.PlotReverseAssociations(renderer, highlightasso); //mxd + BuilderPlug.Me.PlotReverseAssociations(renderer, highlightasso); renderer.PlotLinedef(highlighted, General.Colors.Highlight); } renderer.PlotVerticesSet(General.Map.Map.Vertices); diff --git a/Source/Plugins/BuilderModes/ClassicModes/SectorsMode.cs b/Source/Plugins/BuilderModes/ClassicModes/SectorsMode.cs index de2fefe5..30585b0f 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/SectorsMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/SectorsMode.cs @@ -573,7 +573,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if((highlighted != null) && !highlighted.IsDisposed) { renderer.PlotSector(highlighted, General.Colors.Highlight); - if(!panning) BuilderPlug.Me.PlotReverseAssociations(renderer, highlightasso); //mxd + BuilderPlug.Me.PlotReverseAssociations(renderer, highlightasso); } renderer.Finish(); } @@ -589,7 +589,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Render selection if(renderer.StartOverlay(true)) { - if(!panning && highlighted != null && !highlighted.IsDisposed) BuilderPlug.Me.RenderReverseAssociations(renderer, highlightasso); //mxd + if(highlighted != null && !highlighted.IsDisposed) BuilderPlug.Me.RenderReverseAssociations(renderer, highlightasso); //mxd if(selecting) RenderMultiSelection(); renderer.Finish(); } @@ -750,7 +750,7 @@ namespace CodeImp.DoomBuilder.BuilderModes public override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); - if(panning) return; //mxd. Skip all this jass while panning + if(panning) return; //mxd. Skip all this jazz while panning //mxd if(selectpressed && !editpressed && !selecting) { diff --git a/Source/Plugins/BuilderModes/ClassicModes/ThingsMode.cs b/Source/Plugins/BuilderModes/ClassicModes/ThingsMode.cs index 67b3d17e..dad96b67 100644 --- a/Source/Plugins/BuilderModes/ClassicModes/ThingsMode.cs +++ b/Source/Plugins/BuilderModes/ClassicModes/ThingsMode.cs @@ -147,10 +147,8 @@ namespace CodeImp.DoomBuilder.BuilderModes { renderer.PlotLinedefSet(General.Map.Map.Linedefs); renderer.PlotVerticesSet(General.Map.Map.Vertices); - if (!panning) { //mxd - for (int i = 0; i < Thing.NUM_ARGS; i++) BuilderPlug.Me.PlotAssociations(renderer, association[i]); - if ((highlighted != null) && !highlighted.IsDisposed) BuilderPlug.Me.PlotReverseAssociations(renderer, highlightasso); - } + for (int i = 0; i < Thing.NUM_ARGS; i++) BuilderPlug.Me.PlotAssociations(renderer, association[i]); + if ((highlighted != null) && !highlighted.IsDisposed) BuilderPlug.Me.PlotReverseAssociations(renderer, highlightasso); renderer.Finish(); } diff --git a/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs b/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs index 40e20f42..298d11a2 100644 --- a/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs +++ b/Source/Plugins/BuilderModes/VisualModes/BaseVisualMode.cs @@ -3218,7 +3218,7 @@ namespace CodeImp.DoomBuilder.BuilderModes if(j.sidedef.Index != j.controlSide.Index) { offset -= j.controlSide.OffsetY; offset -= j.controlSide.Fields.GetValue("offsety_mid", 0.0f); - j.sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, offset); + j.sidedef.Fields["offsety_mid"] = new UniValue(UniversalType.Float, offset % texture.Height); } else { offset = GetMiddleOffsetY(j.sidedef, offset, j.scaleY, true);