summaryrefslogtreecommitdiff
path: root/src/ai/default/default.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-01-18 14:48:57 +0000
committersmatz <smatz@openttd.org>2008-01-18 14:48:57 +0000
commit22a7b95c100bc87cf2503314668ed658e1adc673 (patch)
tree8599e5af03b27f75b1675cf70fbf29706d7ebe3f /src/ai/default/default.cpp
parent1d59439166df456e7c886b599eaf3328aef4ad33 (diff)
downloadopenttd-22a7b95c100bc87cf2503314668ed658e1adc673.tar.xz
(svn r11917) -Fix (r3677): AI was reading wrong tile slope while building road bridge
Diffstat (limited to 'src/ai/default/default.cpp')
-rw-r--r--src/ai/default/default.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp
index d48f30211..6eb14a024 100644
--- a/src/ai/default/default.cpp
+++ b/src/ai/default/default.cpp
@@ -2918,7 +2918,7 @@ static inline void AiCheckBuildRoadBridgeHere(AiRoadFinder *arf, TileIndex tile,
tile_new = TILE_MASK(tile_new + TileOffsByDiagDir(dir2));
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,
// or if we found an up tile.
if (!flag) return;