equal
deleted
inserted
replaced
23 |
23 |
24 /* If it's a tunnel alread, take the easy way out! */ |
24 /* If it's a tunnel alread, take the easy way out! */ |
25 if (IsTunnelTile(tile)) return ::GetOtherTunnelEnd(tile); |
25 if (IsTunnelTile(tile)) return ::GetOtherTunnelEnd(tile); |
26 |
26 |
27 ::DoCommand(tile, 0, 0, DC_AUTO, CMD_BUILD_TUNNEL); |
27 ::DoCommand(tile, 0, 0, DC_AUTO, CMD_BUILD_TUNNEL); |
28 return _build_tunnel_endtile == 0 ? tile : _build_tunnel_endtile; |
28 return _build_tunnel_endtile == 0 ? INVALID_TILE : _build_tunnel_endtile; |
29 } |
29 } |
30 |
30 |
31 /* static */ bool AITunnel::BuildTunnel(AIVehicle::VehicleType vehicle_type, TileIndex start) |
31 /* static */ bool AITunnel::BuildTunnel(AIVehicle::VehicleType vehicle_type, TileIndex start) |
32 { |
32 { |
33 EnforcePrecondition(false, ::IsValidTile(start)); |
33 EnforcePrecondition(false, ::IsValidTile(start)); |