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