summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2014-07-16 20:56:39 +0000
committerfrosch <frosch@openttd.org>2014-07-16 20:56:39 +0000
commit14c4b24405c4522b1092110d7b074d5bbe20994d (patch)
tree24590c47638d08c0f3aba1f3cf9b2cf10e844881 /src
parent925fb7bd37a6a33f885807688487ee052efe2409 (diff)
downloadopenttd-14c4b24405c4522b1092110d7b074d5bbe20994d.tar.xz
(svn r26692) -Fix [FS#6059]: Ordering a vehicle to a competitor's rail waypoint displayed an error message. Ignore the click as is done for the other order types to competitor's stuff. (Juanjo)
Diffstat (limited to 'src')
-rw-r--r--src/depot_map.h5
-rw-r--r--src/order_gui.cpp3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/depot_map.h b/src/depot_map.h
index e55994869..c304790f8 100644
--- a/src/depot_map.h
+++ b/src/depot_map.h
@@ -29,6 +29,9 @@ static inline bool IsDepotTypeTile(TileIndex tile, TransportType type)
case TRANSPORT_WATER:
return IsShipDepotTile(tile);
+
+ case TRANSPORT_AIR:
+ return IsHangarTile(tile);
}
}
@@ -58,7 +61,7 @@ static inline DepotID GetDepotIndex(TileIndex t)
/**
* Get the type of vehicles that can use a depot
* @param t The tile
- * @pre IsRailDepotTile(t) || IsRoadDepotTile(t) || IsShipDepotTile(t) || IsTileType(t, MP_STATION)
+ * @pre IsDepotTile(t)
* @return the type of vehicles that can use the depot
*/
static inline VehicleType GetDepotVehicleType(TileIndex t)
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index e69f229f0..b5fd63731 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -410,7 +410,8 @@ static Order GetOrderCmdFromTile(const Vehicle *v, TileIndex tile)
return order;
}
- if ((IsBuoyTile(tile) && v->type == VEH_SHIP) || (IsRailWaypointTile(tile) && v->type == VEH_TRAIN)) {
+ /* check buoy (no ownership) */
+ if (IsBuoyTile(tile) && v->type == VEH_SHIP) {
order.MakeGoToWaypoint(GetStationIndex(tile));
return order;
}