* Try to find a depot nearby. * @param v %Train that wants a depot. * @param max_distance Maximal search distance. * @return Information where the closest train depot is located. * @pre The given vehicle must not be crashed! */
| 2197 | * @pre The given vehicle must not be crashed! |
| 2198 | */ |
| 2199 | static FindDepotData FindClosestTrainDepot(Train *v, int max_distance) |
| 2200 | { |
| 2201 | assert(!v->vehstatus.Test(VehState::Crashed)); |
| 2202 | |
| 2203 | return YapfTrainFindNearestDepot(v, max_distance); |
| 2204 | } |
| 2205 | |
| 2206 | ClosestDepot Train::FindClosestDepot() |
| 2207 | { |
no test coverage detected