diff --git a/source/simulation2/components/CCmpPathfinder_Vertex.cpp b/source/simulation2/components/CCmpPathfinder_Vertex.cpp
index 5ab11b6..c1c2de9 100644
a
|
b
|
void CCmpPathfinder::ComputeShortPath(const IObstructionTestFilter& filter,
|
808 | 808 | |
809 | 809 | // Sort the edges so ones nearer this vertex are checked first by CheckVisibility, |
810 | 810 | // since they're more likely to block the rays |
811 | | std::sort(edgeSquares.begin(), edgeSquares.end(), SquareSort(vertexes[curr.id].p)); |
| 811 | if (edgeSquares.size() > 8) |
| 812 | std::partial_sort(edgeSquares.begin(), edgeSquares.begin() + 8, edgeSquares.end(), SquareSort(vertexes[curr.id].p)); |
812 | 813 | |
813 | 814 | std::vector<Edge> edgesUnaligned; |
814 | 815 | std::vector<EdgeAA> edgesLeft; |