Never intersect trainlines

This commit is contained in:
Markus Koch 2021-03-13 11:27:50 +01:00
parent 9ce5765192
commit 50c39a52bb

View File

@ -315,6 +315,9 @@ int dijkstra_path_intersect(struct dijkstra_solver *solver,
} else { } else {
if (path_a->net_meta->type != path_b->net_meta->type) if (path_a->net_meta->type != path_b->net_meta->type)
return 0; // Never intersect two layers of different types, unless it's through access layers return 0; // Never intersect two layers of different types, unless it's through access layers
// path_a and path_b types are now always guaranteed to be the same
if (path_a->net_meta->type == TRAINLINE)
return 0; // Never intersect trainlines (apart from with access types)
} }
// Check height // Check height