mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-11 00:34:27 +00:00
Change: Allow towns to build bridges over rails and one-way roads. (#7291)
This commit is contained in:
parent
03264059e4
commit
50a0cf1915
@ -1080,14 +1080,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) {
|
||||
@ -1095,7 +1095,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? */
|
||||
|
Loading…
Reference in New Issue
Block a user