(svn r13604) [NoAI] -Fix: rail/road crossings are not buildable either (and worse: caused asserts) noai
authortruebrain
Sun, 22 Jun 2008 12:12:04 +0000
branchnoai
changeset 11048 186fcb00d2a5
parent 11044 097ea3e7ec56
child 11051 00251d01f070
(svn r13604) [NoAI] -Fix: rail/road crossings are not buildable either (and worse: caused asserts)
src/ai/api/ai_tile.cpp
--- a/src/ai/api/ai_tile.cpp	Sat Jun 21 13:40:17 2008 +0000
+++ b/src/ai/api/ai_tile.cpp	Sun Jun 22 12:12:04 2008 +0000
@@ -29,8 +29,8 @@
 		case MP_ROAD:
 			/* Tram bits aren't considered buildable */
 			if (::GetRoadTypes(tile) != ROADTYPES_ROAD) return false;
-			/* Depots aren't considered buildable */
-			if (::GetRoadTileType(tile) == ROAD_TILE_DEPOT) return false;
+			/* Depots and crossings aren't considered buildable */
+			if (::GetRoadTileType(tile) != ROAD_TILE_NORMAL) return false;
 			if (CountBits(::GetRoadBits(tile, ROADTYPE_ROAD)) != 1) return false;
 			if (::IsRoadOwner(tile, ROADTYPE_ROAD, OWNER_TOWN)) return true;
 			if (::IsRoadOwner(tile, ROADTYPE_ROAD, _current_player)) return true;