diff --git a/Assemblies/ResearchTree.dll b/Assemblies/ResearchTree.dll index c6237a9..9c28358 100644 Binary files a/Assemblies/ResearchTree.dll and b/Assemblies/ResearchTree.dll differ diff --git a/Source/Graph/Tree.cs b/Source/Graph/Tree.cs index 04abcb5..793fd0a 100644 --- a/Source/Graph/Tree.cs +++ b/Source/Graph/Tree.cs @@ -327,6 +327,7 @@ private static void EdgeLengthSweep_Local_Layer(int l, bool @in) // current length var length = edge.Length; var neighbour = @in ? edge.In : edge.Out; + var neighbourX = neighbour.X; if (neighbour.X != x) Log.Warning("{0} is not at layer {1}", neighbour, x); @@ -345,7 +346,7 @@ private static void EdgeLengthSweep_Local_Layer(int l, bool @in) continue; // is this spot occupied? - var otherNode = NodeAt(x, y); + var otherNode = NodeAt(neighbourX, y); // occupied, try swapping if (otherNode != null)