mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-22 13:51:33 +03:00
always draw brake light with turn signals
This commit is contained in:
parent
288538b14b
commit
649d0ddbda
@ -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),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user