mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-28 12:12:00 +03:00
Fix a bug in efaf6085e4
that was using walking paths for vehicles. Now prebaked data doesn't budge.
And add some more timing to demonstrate why editing a single lane in a huge map is so slow...
This commit is contained in:
parent
f4c8a508da
commit
866ecd5f88
@ -685,7 +685,9 @@ fn make_topcenter(ctx: &mut EventCtx, app: &App) -> Panel {
|
||||
pub fn apply_map_edits(ctx: &mut EventCtx, app: &mut App, edits: MapEdits) {
|
||||
let mut timer = Timer::new("apply map edits");
|
||||
|
||||
timer.start("edit map");
|
||||
let effects = app.primary.map.must_apply_edits(edits);
|
||||
timer.stop("edit map");
|
||||
|
||||
if !effects.changed_roads.is_empty() || !effects.changed_intersections.is_empty() {
|
||||
app.primary
|
||||
@ -715,11 +717,13 @@ pub fn apply_map_edits(ctx: &mut EventCtx, app: &mut App, edits: MapEdits) {
|
||||
.recreate_intersection(i, &app.primary.map);
|
||||
}
|
||||
|
||||
timer.start("resnap buildings");
|
||||
if effects.resnapped_buildings {
|
||||
app.primary
|
||||
.draw_map
|
||||
.recreate_building_driveways(ctx, &app.primary.map, &app.cs, &app.opts);
|
||||
}
|
||||
timer.stop("resnap buildings");
|
||||
for pl in effects.changed_parking_lots {
|
||||
app.primary.draw_map.get_pl(pl).clear_rendering();
|
||||
}
|
||||
|
@ -201,8 +201,11 @@ impl TripManager {
|
||||
} else {
|
||||
PathConstraints::Car
|
||||
};
|
||||
let req =
|
||||
PathRequest::walking(start_pos, goal.goal_pos(constraints, ctx.map).unwrap());
|
||||
let req = PathRequest::vehicle(
|
||||
start_pos,
|
||||
goal.goal_pos(constraints, ctx.map).unwrap(),
|
||||
constraints,
|
||||
);
|
||||
let person = person.id;
|
||||
|
||||
match self.maybe_spawn_car(ctx, now, trip, req, vehicle.id) {
|
||||
|
Loading…
Reference in New Issue
Block a user