diff --git a/Cargo.lock b/Cargo.lock index 1dc6cba9a7..f14ede782c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2660,7 +2660,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "seattle_traffic_signals" version = "0.1.0" -source = "git+https://github.com/dabreegster/seattle_traffic_signals#75a8500a59bbaf74fb0aa08a7cad6a075472f1e9" +source = "git+https://github.com/dabreegster/seattle_traffic_signals#e3afd88651ef379cb1dd094ab4b927a0b3083513" dependencies = [ "include_dir 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.106 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/game/src/render/turn.rs b/game/src/render/turn.rs index 138c8cd122..3d681cda33 100644 --- a/game/src/render/turn.rs +++ b/game/src/render/turn.rs @@ -66,10 +66,14 @@ impl DrawTurnGroup { .max() .unwrap() as f64; let (pl, width) = group.src_center_and_width(map); - let slice = pl.exact_slice( - offset * TURN_ICON_ARROW_LENGTH, - (offset + 1.0) * TURN_ICON_ARROW_LENGTH, - ); + let slice = if pl.length() >= (offset + 1.0) * TURN_ICON_ARROW_LENGTH { + pl.exact_slice( + offset * TURN_ICON_ARROW_LENGTH, + (offset + 1.0) * TURN_ICON_ARROW_LENGTH, + ) + } else { + pl + }; let block = slice.make_polygons(width); let arrow = {