From ca9b7310cb088092d4d3ef96ca5c004ad9e69e38 Mon Sep 17 00:00:00 2001 From: Paris DOUADY Date: Sun, 13 Aug 2023 15:34:11 +0200 Subject: [PATCH] dont change turn colors when inter is updated --- native_app/src/gui/roadeditor.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/native_app/src/gui/roadeditor.rs b/native_app/src/gui/roadeditor.rs index cabe4219..dca02e62 100644 --- a/native_app/src/gui/roadeditor.rs +++ b/native_app/src/gui/roadeditor.rs @@ -40,8 +40,7 @@ pub fn roadeditor(goria: &Egregoria, uiworld: &mut UiWorld) { if let Some(inter) = map.intersections().get(id) { let lanes = map.lanes(); for turn in inter.turns() { - let p = unwrap_or!(turn.points.get(turn.points.n_points() / 2), continue); - let r = common::rand::rand2(p.x, p.y); + let r = common::rand::randu64(common::hash_u64(turn.id)); let col = Color::hsv(r * 360.0, 0.8, 0.6, 0.5); let or_src = unwrap_cont!(lanes.get(turn.id.src)).orientation_from(inter.id);