Fixed the issue of newly built intersecting node not connecting to all existing (intersecting) roads

This commit is contained in:
2026-05-01 19:03:31 +02:00
parent dd64ec648a
commit f7a1340500
3 changed files with 14 additions and 9 deletions

View File

@@ -87,6 +87,8 @@ pub const Road = struct {
if (self.nodes[i] != old_node) continue;
self.nodes[i] = new_node;
// As nodes change, road's length must be recalculated
self.length = ut.calculate_length(self.nodes[0].pos, self.nodes[1].pos);
return;
}