(svn r11917) -Fix (r3677): AI was reading wrong tile slope while building road bridge
authorsmatz
Fri, 18 Jan 2008 14:48:57 +0000
changeset 8847 98ccd8072daf
parent 8846 f3e877a92e2b
child 8848 96987946673f
(svn r11917) -Fix (r3677): AI was reading wrong tile slope while building road bridge
src/ai/default/default.cpp
--- a/src/ai/default/default.cpp	Fri Jan 18 13:02:47 2008 +0000
+++ b/src/ai/default/default.cpp	Fri Jan 18 14:48:57 2008 +0000
@@ -2918,7 +2918,7 @@
 			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;