diff --git a/Source/Core/GZBuilder/Data/LinksCollector.cs b/Source/Core/GZBuilder/Data/LinksCollector.cs index cfca1a3..53a7794 100644 --- a/Source/Core/GZBuilder/Data/LinksCollector.cs +++ b/Source/Core/GZBuilder/Data/LinksCollector.cs @@ -226,12 +226,12 @@ namespace CodeImp.DoomBuilder.GZBuilder.Data if (!result.PatrolPoints.ContainsKey(t.Tag)) continue; start = t.Position; - start.z += GetCorrectHeight(t, blockmap, true); + start.z += GetCorrectHeight(t, blockmap, bsp, true); foreach (Thing tt in result.PatrolPoints[t.Tag]) { end = tt.Position; - end.z += GetCorrectHeight(tt, blockmap, true); + end.z += GetCorrectHeight(tt, blockmap, bsp, true); lines.Add(new Line3D(start, end, General.Colors.Selection)); } @@ -357,7 +357,7 @@ namespace CodeImp.DoomBuilder.GZBuilder.Data if (targettag == 0 || !result.InterpolationPoints.ContainsKey(targettag)) continue; //no target / target doesn't exist start = t.Position; - start.z += GetCorrectHeight(t, blockmap, true); + start.z += GetCorrectHeight(t, blockmap, bsp, true); foreach (PathNode node in result.InterpolationPoints[targettag]) { diff --git a/Source/Plugins/BuilderModes/General/Association.cs b/Source/Plugins/BuilderModes/General/Association.cs index 5af4844..dd2b9a9 100644 --- a/Source/Plugins/BuilderModes/General/Association.cs +++ b/Source/Plugins/BuilderModes/General/Association.cs @@ -26,6 +26,7 @@ using CodeImp.DoomBuilder.Map; using CodeImp.DoomBuilder.Rendering; using CodeImp.DoomBuilder.Types; using CodeImp.DoomBuilder.Windows; +using CodeImp.DoomBuilder.GZBuilder.Geometry; #endregion @@ -37,7 +38,6 @@ namespace CodeImp.DoomBuilder.BuilderModes private Vector2D center; private UniversalType type; private int directlinktype; - private int directlinktype; private Dictionary> eventlines; private IRenderer2D renderer; private SelectableElement element; @@ -551,7 +551,7 @@ namespace CodeImp.DoomBuilder.BuilderModes } } - description += " (" + string.Join(", ", argdescription) + ")"; + //description += " (" + string.Join(", ", argdescription) + ")"; return description; } @@ -606,8 +606,8 @@ namespace CodeImp.DoomBuilder.BuilderModes private Vector2D GetLabelPosition(Vector2D start, Vector2D end) { // Check if start/end point is on screen... - Vector2D lt = General.Map.Renderer2D.DisplayToMap(new Vector2D(0.0, General.Interface.Display.Size.Height)); - Vector2D rb = General.Map.Renderer2D.DisplayToMap(new Vector2D(General.Interface.Display.Size.Width, 0.0)); + Vector2D lt = General.Map.Renderer2D.DisplayToMap(new Vector2D(0.0f, General.Interface.Display.Size.Height)); + Vector2D rb = General.Map.Renderer2D.DisplayToMap(new Vector2D(General.Interface.Display.Size.Width, 0.0f)); RectangleF viewport = new RectangleF((float)lt.x, (float)lt.y, (float)(rb.x - lt.x), (float)(rb.y - lt.y)); bool startvisible = viewport.Contains((float)start.x, (float)start.y); bool endvisible = viewport.Contains((float)end.x, (float)end.y); @@ -626,7 +626,7 @@ namespace CodeImp.DoomBuilder.BuilderModes foreach (Line2D side in viewportsides) { // Modify the start point so it stays on screen - double u; + float u; if (!startvisible && side.GetIntersection(drawnline, out u)) { start = drawnline.GetCoordinatesAt(u); @@ -644,7 +644,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // Create position Vector2D delta = end - start; - return new Vector2D(start.x + delta.x * 0.5, start.y + delta.y * 0.5); + return new Vector2D(start.x + delta.x * 0.5f, start.y + delta.y * 0.5f); } /// @@ -657,7 +657,7 @@ namespace CodeImp.DoomBuilder.BuilderModes { List allpositions = positions.OrderBy(o => o.x).ToList(); List newpositions = new List(positions.Count); - Vector2D mergedistance = distance / renderer.Scale * 1.5; + Vector2D mergedistance = distance / renderer.Scale * 1.5f; // Keep going while we have positions me might want to merge while (allpositions.Count > 0) @@ -691,8 +691,8 @@ namespace CodeImp.DoomBuilder.BuilderModes } // ... and set the current position to the center of that - curposition.x = tl.x + (br.x - tl.x) / 2.0; - curposition.y = tl.y + (br.y - tl.y) / 2.0; + curposition.x = tl.x + (br.x - tl.x) / 2.0f; + curposition.y = tl.y + (br.y - tl.y) / 2.0f; } else { diff --git a/Source/Plugins/BuilderModes/Interface/PreferencesForm.Designer.cs b/Source/Plugins/BuilderModes/Interface/PreferencesForm.Designer.cs index 74569e7..5e7e453 100644 --- a/Source/Plugins/BuilderModes/Interface/PreferencesForm.Designer.cs +++ b/Source/Plugins/BuilderModes/Interface/PreferencesForm.Designer.cs @@ -75,6 +75,9 @@ namespace CodeImp.DoomBuilder.BuilderModes this.mouseselectionthreshold = new CodeImp.DoomBuilder.Controls.ButtonsNumericTextbox(); this.label16 = new System.Windows.Forms.Label(); this.label17 = new System.Windows.Forms.Label(); + this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.eventlinelabelvisibility = new System.Windows.Forms.ComboBox(); + this.eventlinelabelstyle = new System.Windows.Forms.ComboBox(); this.tabs.SuspendLayout(); this.taboptions.SuspendLayout(); this.groupBox4.SuspendLayout(); @@ -99,6 +102,7 @@ namespace CodeImp.DoomBuilder.BuilderModes // // taboptions // + this.taboptions.Controls.Add(this.groupBox5); this.taboptions.Controls.Add(this.groupBox4); this.taboptions.Controls.Add(this.groupBox3); this.taboptions.Controls.Add(this.groupBox2); @@ -661,6 +665,44 @@ namespace CodeImp.DoomBuilder.BuilderModes this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(100, 23); this.label17.TabIndex = 0; + // + // groupBox5 + // + this.groupBox5.Controls.Add(this.eventlinelabelstyle); + this.groupBox5.Controls.Add(this.eventlinelabelvisibility); + this.groupBox5.Location = new System.Drawing.Point(6, 445); + this.groupBox5.Name = "groupBox5"; + this.groupBox5.Size = new System.Drawing.Size(272, 54); + this.groupBox5.TabIndex = 4; + this.groupBox5.TabStop = false; + this.groupBox5.Text = "Event line labels"; + // + // eventlinelabelvisibility + // + this.eventlinelabelvisibility.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.eventlinelabelvisibility.FormattingEnabled = true; + this.eventlinelabelvisibility.Items.AddRange(new object[] { + "Never show", + "Forward only", + "Reverse only", + "Forward + Reverse"}); + this.eventlinelabelvisibility.Location = new System.Drawing.Point(6, 19); + this.eventlinelabelvisibility.Name = "eventlinelabelvisibility"; + this.eventlinelabelvisibility.Size = new System.Drawing.Size(121, 21); + this.eventlinelabelvisibility.TabIndex = 0; + // + // eventlinelabelstyle + // + this.eventlinelabelstyle.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.eventlinelabelstyle.FormattingEnabled = true; + this.eventlinelabelstyle.Items.AddRange(new object[] { + "Action only", + "Action + short arguments", + "Action + full arguments"}); + this.eventlinelabelstyle.Location = new System.Drawing.Point(133, 19); + this.eventlinelabelstyle.Name = "eventlinelabelstyle"; + this.eventlinelabelstyle.Size = new System.Drawing.Size(133, 21); + this.eventlinelabelstyle.TabIndex = 1; // // PreferencesForm // @@ -737,5 +779,8 @@ namespace CodeImp.DoomBuilder.BuilderModes private System.Windows.Forms.Label label17; private System.Windows.Forms.CheckBox additivepaintselect; private System.Windows.Forms.CheckBox selectafterundoredo; + private System.Windows.Forms.GroupBox groupBox5; + private System.Windows.Forms.ComboBox eventlinelabelvisibility; + private System.Windows.Forms.ComboBox eventlinelabelstyle; } } \ No newline at end of file