mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-27 16:36:02 +03:00
oops, bike starting at border was using a router to car-style park
This commit is contained in:
parent
211019efd2
commit
6bdb28cced
@ -155,6 +155,7 @@ impl ParkedCar {
|
||||
vehicle: kinematics::Vehicle,
|
||||
owner: Option<BuildingID>,
|
||||
) -> ParkedCar {
|
||||
assert_eq!(vehicle.vehicle_type, VehicleType::Car);
|
||||
ParkedCar {
|
||||
car,
|
||||
spot,
|
||||
|
@ -222,8 +222,12 @@ impl Spawner {
|
||||
start: Position::new(start, 0.0 * si::M),
|
||||
router: match goal {
|
||||
DrivingGoal::ParkNear(b) => {
|
||||
if vehicle.vehicle_type == VehicleType::Bike {
|
||||
Router::make_bike_router(path, req.end.dist_along())
|
||||
} else {
|
||||
Router::make_router_to_park(path, *b)
|
||||
}
|
||||
}
|
||||
DrivingGoal::Border(_, _) => {
|
||||
Router::make_router_to_border(path)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user