Update to 1.9.0-RC1

This commit is contained in:
Pavel Stupnikov
2019-03-13 02:03:13 +03:00
79 changed files with 984 additions and 646 deletions

View File

@@ -1215,14 +1215,14 @@ static bool GrowTownWithBridge(const Town *t, const TileIndex tile, const DiagDi
const int delta = TileOffsByDiagDir(bridge_dir);
if (slope == SLOPE_FLAT) {
/* Bridges starting on flat tiles are only allowed when crossing rivers. */
/* Bridges starting on flat tiles are only allowed when crossing rivers, rails or one-way roads. */
do {
if (bridge_length++ >= 4) {
/* Allow to cross rivers, not big lakes. */
/* Allow to cross rivers, not big lakes, nor large amounts of rails or one-way roads. */
return false;
}
bridge_tile += delta;
} while (IsValidTile(bridge_tile) && IsWaterTile(bridge_tile) && !IsSea(bridge_tile));
} while (IsValidTile(bridge_tile) && ((IsWaterTile(bridge_tile) && !IsSea(bridge_tile)) || IsPlainRailTile(bridge_tile) || (IsNormalRoadTile(bridge_tile) && GetDisallowedRoadDirections(bridge_tile) != DRD_NONE)));
} else {
do {
if (bridge_length++ >= 11) {
@@ -1230,7 +1230,7 @@ static bool GrowTownWithBridge(const Town *t, const TileIndex tile, const DiagDi
return false;
}
bridge_tile += delta;
} while (IsValidTile(bridge_tile) && IsWaterTile(bridge_tile));
} while (IsValidTile(bridge_tile) && (IsWaterTile(bridge_tile) || IsPlainRailTile(bridge_tile) || (IsNormalRoadTile(bridge_tile) && GetDisallowedRoadDirections(bridge_tile) != DRD_NONE)));
}
/* no water tiles in between? */