mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-25 07:25:47 +03:00
Dodge a traffic signal rendering crash encountered near Trafalgar Square
This commit is contained in:
parent
4576e9c1d0
commit
fbd3a603dc
@ -57,15 +57,16 @@ pub fn draw_signal_stage(
|
||||
};
|
||||
|
||||
let pl = &signal.movements[m].geom;
|
||||
batch.push(
|
||||
if yellow_light {
|
||||
yellow
|
||||
} else {
|
||||
app.cs.signal_protected_turn.alpha(percent)
|
||||
},
|
||||
pl.exact_slice(slice_start, pl.length() - slice_end)
|
||||
.make_arrow(BIG_ARROW_THICKNESS, ArrowCap::Triangle),
|
||||
);
|
||||
if let Ok(pl) = pl.maybe_exact_slice(slice_start, pl.length() - slice_end) {
|
||||
batch.push(
|
||||
if yellow_light {
|
||||
yellow
|
||||
} else {
|
||||
app.cs.signal_protected_turn.alpha(percent)
|
||||
},
|
||||
pl.make_arrow(BIG_ARROW_THICKNESS, ArrowCap::Triangle),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
let (center, angle) = crosswalk_icon(&signal.movements[m].geom);
|
||||
batch.append(
|
||||
|
Loading…
Reference in New Issue
Block a user