Fixed the issue of newly built intersecting node not connecting to all existing (intersecting) roads
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user