Error Checks mode: connected lines with decimal positions were reported as overlapping in some cases.

This commit is contained in:
MaxED 2013-08-23 14:22:40 +00:00
parent 71b0d0754d
commit e1050775b3
2 changed files with 6 additions and 3 deletions

View file

@ -16,6 +16,7 @@
#region ================== Namespaces
using System;
using System.Collections.Generic;
using CodeImp.DoomBuilder.Map;
using System.Threading;
@ -74,8 +75,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Check if the lines touch. Note that I don't include 0.0 and 1.0 here because
// the lines may be touching at the ends when sharing the same vertex.
if(l.Line.GetIntersection(d.Line, out du, out lu))
{
if(l.Line.GetIntersection(d.Line, out du, out lu)) {
lu = (float)Math.Round(lu, General.Map.FormatInterface.VertexDecimals); //mxd
du = (float)Math.Round(du, General.Map.FormatInterface.VertexDecimals); //mxd
if((lu > 0.0f) && (lu < 1.0f) && (du > 0.0f) && (du < 1.0f))
{
// Check if not the same sector on all sides

View file

@ -58,7 +58,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
// This must return the string that is displayed in the listbox
public override string ToString()
{
return "Linedefs " + line1.Index + " and " + line2.Index + " are overlapping and references different sectors";
return "Linedefs " + line1.Index + " and " + line2.Index + " are overlapping and reference different sectors";
}
// Rendering