From 5056eddc65fe8d0da425d33f1b31de75d5fdcc7b Mon Sep 17 00:00:00 2001 From: codeimp Date: Wed, 8 Oct 2008 20:09:44 +0000 Subject: [PATCH] fixed some bugs I made while making little optimizations --- Source/Geometry/LinedefAngleSorter.cs | 2 +- Source/Geometry/LinedefsTracePath.cs | 4 ++-- Source/Geometry/SidedefAngleSorter.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Geometry/LinedefAngleSorter.cs b/Source/Geometry/LinedefAngleSorter.cs index d4c0b477..cb4ffc30 100644 --- a/Source/Geometry/LinedefAngleSorter.cs +++ b/Source/Geometry/LinedefAngleSorter.cs @@ -88,7 +88,7 @@ namespace CodeImp.DoomBuilder.Geometry else if(ax > ay) return -1; else return 0; */ - return Math.Sign(ax - ay); + return Math.Sign(ay - ax); } } } diff --git a/Source/Geometry/LinedefsTracePath.cs b/Source/Geometry/LinedefsTracePath.cs index 8d419a11..67cc104e 100644 --- a/Source/Geometry/LinedefsTracePath.cs +++ b/Source/Geometry/LinedefsTracePath.cs @@ -120,9 +120,9 @@ namespace CodeImp.DoomBuilder.Geometry // Add next vertex if(forward) - p.AddLast(new EarClipVertex(base[i].Start.Position, base[0].Front)); + p.AddLast(new EarClipVertex(base[i].Start.Position, base[i].Front)); else - p.AddLast(new EarClipVertex(base[i].End.Position, base[0].Back)); + p.AddLast(new EarClipVertex(base[i].End.Position, base[i].Back)); } } diff --git a/Source/Geometry/SidedefAngleSorter.cs b/Source/Geometry/SidedefAngleSorter.cs index bb5b8cf0..ec367071 100644 --- a/Source/Geometry/SidedefAngleSorter.cs +++ b/Source/Geometry/SidedefAngleSorter.cs @@ -90,7 +90,7 @@ namespace CodeImp.DoomBuilder.Geometry else if(ax > ay) return -1; else return 0; */ - return Math.Sign(ax - ay); + return Math.Sign(ay - ax); } } }