summaryrefslogtreecommitdiff
path: root/order_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-07-27 05:30:53 +0000
committertron <tron@openttd.org>2006-07-27 05:30:53 +0000
commit3c368fc05e3ce887c8927b3ae678cf892f45525d (patch)
tree402e84c5a08dd81d1c5453aa00229a86afbb0248 /order_gui.c
parentd6f6f76a7ceda6cb895fa1bdb5512f40ca84b313 (diff)
downloadopenttd-3c368fc05e3ce887c8927b3ae678cf892f45525d.tar.xz
(svn r5624) Use {IsPlainRailTile,IsRailDepot,IsRailWaypoint,HasSignals}() instead of GetRailTile{T,Subt}ype() - this is more concise and a bit more flexible if/when the rail tile encoding changes
Diffstat (limited to 'order_gui.c')
-rw-r--r--order_gui.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/order_gui.c b/order_gui.c
index c5f38fc3d..778115abe 100644
--- a/order_gui.c
+++ b/order_gui.c
@@ -200,8 +200,7 @@ static Order GetOrderCmdFromTile(const Vehicle *v, TileIndex tile)
switch (GetTileType(tile)) {
case MP_RAILWAY:
if (v->type == VEH_Train && IsTileOwner(tile, _local_player)) {
- if (GetRailTileType(tile) == RAIL_TILE_DEPOT_WAYPOINT &&
- GetRailTileSubtype(tile) == RAIL_SUBTYPE_DEPOT) {
+ if (IsRailDepot(tile)) {
order.type = OT_GOTO_DEPOT;
order.flags = OF_PART_OF_ORDERS;
order.station = GetDepotByTile(tile)->index;