train_cmd.c
changeset 4182 48dba107ff43
parent 4095 ad7a6bc2bf80
child 4197 b7f7dcebf67f
equal deleted inserted replaced
4181:bc83c8cbe49a 4182:48dba107ff43
  1828 
  1828 
  1829 static bool NtpCallbFindDepot(TileIndex tile, TrainFindDepotData *tfdd, int track, uint length)
  1829 static bool NtpCallbFindDepot(TileIndex tile, TrainFindDepotData *tfdd, int track, uint length)
  1830 {
  1830 {
  1831 	if (IsTileType(tile, MP_RAILWAY) &&
  1831 	if (IsTileType(tile, MP_RAILWAY) &&
  1832 			IsTileOwner(tile, tfdd->owner) &&
  1832 			IsTileOwner(tile, tfdd->owner) &&
  1833 			GetRailTileType(tile) == RAIL_TILE_DEPOT_WAYPOINT &&
  1833 			IsRailDepot(tile)) {
  1834 			GetRailTileSubtype(tile) == RAIL_SUBTYPE_DEPOT) {
       
  1835 		tfdd->best_length = length;
  1834 		tfdd->best_length = length;
  1836 		tfdd->tile = tile;
  1835 		tfdd->tile = tile;
  1837 		return true;
  1836 		return true;
  1838 	}
  1837 	}
  1839 
  1838