yapf/yapf_road.cpp
changeset 3977 513433ebd092
parent 3976 6135bc445350
child 3981 b61ec1c297cd
equal deleted inserted replaced
3976:6135bc445350 3977:513433ebd092
   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