1
0
Fork 0

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

pull/8480/head
J0anJosep 2020-12-25 15:06:18 +01:00
parent 275c141bf4
commit afcbba8d6b
1 changed files with 4 additions and 0 deletions

View File

@ -382,6 +382,10 @@ public:
c += count * 3 * YAPF_TILE_LENGTH; 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. */ /* Skipped tile cost for aqueducts. */
c += YAPF_TILE_LENGTH * tf->m_tiles_skipped; c += YAPF_TILE_LENGTH * tf->m_tiles_skipped;