mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-09-01 19:09:09 +00:00
(svn r11917) -Fix (r3677): AI was reading wrong tile slope while building road bridge
This commit is contained in:
@@ -2918,7 +2918,7 @@ static inline void AiCheckBuildRoadBridgeHere(AiRoadFinder *arf, TileIndex tile,
|
|||||||
tile_new = TILE_MASK(tile_new + TileOffsByDiagDir(dir2));
|
tile_new = TILE_MASK(tile_new + TileOffsByDiagDir(dir2));
|
||||||
type = GetTileType(tile_new);
|
type = GetTileType(tile_new);
|
||||||
|
|
||||||
if (type == MP_CLEAR || type == MP_TREES || GetTileSlope(tile, NULL) != SLOPE_FLAT) {
|
if (type == MP_CLEAR || type == MP_TREES || GetTileSlope(tile_new, NULL) != SLOPE_FLAT) {
|
||||||
// Allow a bridge if either we have a tile that's water, rail or street,
|
// Allow a bridge if either we have a tile that's water, rail or street,
|
||||||
// or if we found an up tile.
|
// or if we found an up tile.
|
||||||
if (!flag) return;
|
if (!flag) return;
|
||||||
|
Reference in New Issue
Block a user