Merge branch 'master' into jgrpp

# Conflicts:
#	src/lang/czech.txt
#	src/lang/galician.txt
#	src/lang/german.txt
#	src/order_cmd.cpp
#	src/saveload/afterload.cpp
#	src/ship.h
#	src/vehicle.cpp
This commit is contained in:
Jonathan G Rennison
2023-01-05 23:45:34 +00:00
37 changed files with 2358 additions and 1572 deletions

View File

@@ -363,15 +363,12 @@ static FindDepotData FindClosestRoadDepot(const RoadVehicle *v, int max_distance
}
}
bool RoadVehicle::FindClosestDepot(TileIndex *location, DestinationID *destination, bool *reverse)
ClosestDepot RoadVehicle::FindClosestDepot()
{
FindDepotData rfdd = FindClosestRoadDepot(this, 0);
if (rfdd.best_length == UINT_MAX) return false;
if (rfdd.best_length == UINT_MAX) return ClosestDepot();
if (location != nullptr) *location = rfdd.tile;
if (destination != nullptr) *destination = GetDepotIndex(rfdd.tile);
return true;
return ClosestDepot(rfdd.tile, GetDepotIndex(rfdd.tile));
}
inline bool IsOneWayRoadTile(TileIndex tile)