From 649d0ddbda22790069225d12527af9997b1ff85e Mon Sep 17 00:00:00 2001 From: Dustin Carlino Date: Mon, 13 Jan 2020 09:08:51 -0800 Subject: [PATCH] always draw brake light with turn signals --- game/src/render/car.rs | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/game/src/render/car.rs b/game/src/render/car.rs index 434dda9d4d..6475f366cb 100644 --- a/game/src/render/car.rs +++ b/game/src/render/car.rs @@ -77,26 +77,27 @@ impl DrawCar { .unwrap(), ); } - TurnType::Straight => { - let (pos, angle) = input.body.dist_along(Distance::meters(0.5)); - // TODO rounded - let window_length_gap = Distance::meters(0.2); - let window_thickness = Distance::meters(0.3); - draw_default.push( - cs.get_def("brake light", Color::hex("#FF1300")), - thick_line_from_angle( - window_thickness, - CAR_WIDTH - window_length_gap * 2.0, - pos.project_away( - CAR_WIDTH / 2.0 - window_length_gap, - angle.rotate_degs(-90.0), - ), - angle.rotate_degs(90.0), - ), - ); - } + TurnType::Straight => {} TurnType::Crosswalk | TurnType::SharedSidewalkCorner => unreachable!(), } + + // Always draw the brake light + let (pos, angle) = input.body.dist_along(Distance::meters(0.5)); + // TODO rounded + let window_length_gap = Distance::meters(0.2); + let window_thickness = Distance::meters(0.3); + draw_default.push( + cs.get_def("brake light", Color::hex("#FF1300")), + thick_line_from_angle( + window_thickness, + CAR_WIDTH - window_length_gap * 2.0, + pos.project_away( + CAR_WIDTH / 2.0 - window_length_gap, + angle.rotate_degs(-90.0), + ), + angle.rotate_degs(90.0), + ), + ); } }