equal
deleted
inserted
replaced
427 } |
427 } |
428 |
428 |
429 Depot* YapfFindNearestRoadDepot(const Vehicle *v) |
429 Depot* YapfFindNearestRoadDepot(const Vehicle *v) |
430 { |
430 { |
431 TileIndex tile = v->tile; |
431 TileIndex tile = v->tile; |
432 #if 0 /* NOT NEEDED, function does/did nothing */ |
|
433 if (v->u.road.state == 255) tile = GetVehicleOutOfTunnelTile(v); |
432 if (v->u.road.state == 255) tile = GetVehicleOutOfTunnelTile(v); |
434 #endif |
|
435 Trackdir trackdir = GetVehicleTrackdir(v); |
433 Trackdir trackdir = GetVehicleTrackdir(v); |
436 if ((GetTileTrackStatus(tile, TRANSPORT_ROAD) & TrackdirToTrackdirBits(trackdir)) == 0) |
434 if ((GetTileTrackStatus(tile, TRANSPORT_ROAD) & TrackdirToTrackdirBits(trackdir)) == 0) |
437 return NULL; |
435 return NULL; |
438 |
436 |
439 // handle the case when our vehicle is already in the depot tile |
437 // handle the case when our vehicle is already in the depot tile |