summaryrefslogtreecommitdiff
path: root/order_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-03-19 13:48:08 +0000
committertron <tron@openttd.org>2006-03-19 13:48:08 +0000
commita90e46bf03365920f2a13254ec17f1d4f76727f6 (patch)
tree66c89a776909a6e784becbe687a7906a69356023 /order_gui.c
parent667666f1a3a108b6297527102f173deff56d072d (diff)
downloadopenttd-a90e46bf03365920f2a13254ec17f1d4f76727f6.tar.xz
(svn r3981) More work for the rail accessing functions and enums
Diffstat (limited to 'order_gui.c')
-rw-r--r--order_gui.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/order_gui.c b/order_gui.c
index cf65b2288..a83c7b70e 100644
--- a/order_gui.c
+++ b/order_gui.c
@@ -197,7 +197,8 @@ static Order GetOrderCmdFromTile(const Vehicle *v, TileIndex tile)
switch (GetTileType(tile)) {
case MP_RAILWAY:
if (v->type == VEH_Train && IsTileOwner(tile, _local_player)) {
- if ((_m[tile].m5&0xFC)==0xC0) {
+ if (GetRailTileType(tile) == RAIL_TYPE_DEPOT_WAYPOINT &&
+ GetRailTileSubtype(tile) == RAIL_SUBTYPE_DEPOT) {
order.type = OT_GOTO_DEPOT;
order.flags = OF_PART_OF_ORDERS;
order.station = GetDepotByTile(tile)->index;