mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-12-28 08:53:26 +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,
|
vehicle: kinematics::Vehicle,
|
||||||
owner: Option<BuildingID>,
|
owner: Option<BuildingID>,
|
||||||
) -> ParkedCar {
|
) -> ParkedCar {
|
||||||
|
assert_eq!(vehicle.vehicle_type, VehicleType::Car);
|
||||||
ParkedCar {
|
ParkedCar {
|
||||||
car,
|
car,
|
||||||
spot,
|
spot,
|
||||||
|
@ -222,8 +222,12 @@ impl Spawner {
|
|||||||
start: Position::new(start, 0.0 * si::M),
|
start: Position::new(start, 0.0 * si::M),
|
||||||
router: match goal {
|
router: match goal {
|
||||||
DrivingGoal::ParkNear(b) => {
|
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)
|
Router::make_router_to_park(path, *b)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
DrivingGoal::Border(_, _) => {
|
DrivingGoal::Border(_, _) => {
|
||||||
Router::make_router_to_border(path)
|
Router::make_router_to_border(path)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user