# HG changeset patch # User glx # Date 1211559553 0 # Node ID fcd493243794ac9fc8a3cc428911d06515371d5b # Parent 9dca9483f2c013494210ae12602521c57e8c7c6b (svn r13223) [NoAI] -Fix (r13212): tunnels and bridges were not tram aware diff -r 9dca9483f2c0 -r fcd493243794 src/ai/api/ai_bridge.cpp --- a/src/ai/api/ai_bridge.cpp Fri May 23 09:46:39 2008 +0000 +++ b/src/ai/api/ai_bridge.cpp Fri May 23 16:19:13 2008 +0000 @@ -32,7 +32,7 @@ uint type = 0; if (vehicle_type == AIVehicle::VEHICLE_ROAD) { type |= (TRANSPORT_ROAD << 15); - type |= (ROADTYPES_ROAD << 8); + type |= (RoadTypeToRoadTypes((::RoadType)AIObject::GetRoadType()) << 8); } else { type |= (TRANSPORT_RAIL << 15); type |= (RAILTYPES_RAIL << 8); diff -r 9dca9483f2c0 -r fcd493243794 src/ai/api/ai_tunnel.cpp --- a/src/ai/api/ai_tunnel.cpp Fri May 23 09:46:39 2008 +0000 +++ b/src/ai/api/ai_tunnel.cpp Fri May 23 16:19:13 2008 +0000 @@ -10,6 +10,7 @@ #include "../../road_type.h" #include "../../command_func.h" #include "../../tunnelbridge.h" +#include "../../road_func.h" /* static */ bool AITunnel::IsTunnelTile(TileIndex tile) { @@ -35,7 +36,7 @@ uint type = 0; if (vehicle_type == AIVehicle::VEHICLE_ROAD) { type |= (TRANSPORT_ROAD << 9); - type |= ROADTYPES_ROAD; + type |= RoadTypeToRoadTypes((::RoadType)AIObject::GetRoadType()); } else { type |= (TRANSPORT_RAIL << 9); type |= RAILTYPES_RAIL;