1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 20:49:11 +00:00

Add: Do not try to cross an extended depot that has a ship inside.

This commit is contained in:
J0anJosep
2020-12-25 15:06:18 +01:00
parent 275c141bf4
commit afcbba8d6b

View File

@@ -382,6 +382,10 @@ public:
c += count * 3 * YAPF_TILE_LENGTH;
}
if (IsShipDepotTile(n.GetTile())) {
if (IsExtendedDepot(n.GetTile()) && IsDepotFullWithStoppedVehicles(n.GetTile())) c += YAPF_INFINITE_PENALTY;
}
/* Skipped tile cost for aqueducts. */
c += YAPF_TILE_LENGTH * tf->m_tiles_skipped;