summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordominik <dominik@openttd.org>2004-09-27 14:30:17 +0000
committerdominik <dominik@openttd.org>2004-09-27 14:30:17 +0000
commita99ac0d0575b3b6849b6de719ac5d5790f018c40 (patch)
tree44b43aaaacd7bf43b7d8164ffc53d475c356c984
parentedf841fb6fb6baf414b30fa2d2a21d5faf5c373c (diff)
downloadopenttd-a99ac0d0575b3b6849b6de719ac5d5790f018c40.tar.xz
(svn r329) Fix: [ 1035066 ] 'Allow goto depot' turned off, no checkpoints in orders
-rw-r--r--order_gui.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/order_gui.c b/order_gui.c
index 54ef8bbe1..4df0fdd1f 100644
--- a/order_gui.c
+++ b/order_gui.c
@@ -169,9 +169,6 @@ static uint GetOrderCmdFromTile(Vehicle *v, uint tile)
if (v->type == VEH_Train && _map_owner[tile] == _local_player) {
if ((_map5[tile]&0xFC)==0xC0)
return (GetDepotByTile(tile)<<8) | OT_GOTO_DEPOT | OF_UNLOAD;
-
- if ((_map5[tile]&0xFE)==0xC4)
- return (GetCheckpointByTile(tile)<<8) | OT_GOTO_CHECKPOINT;
}
break;
@@ -198,6 +195,13 @@ static uint GetOrderCmdFromTile(Vehicle *v, uint tile)
}
}
+ // check checkpoint
+ if (IS_TILETYPE(tile, MP_RAILWAY)
+ && v->type == VEH_Train
+ && _map_owner[tile] == _local_player
+ && (_map5[tile]&0xFE)==0xC4)
+ return (GetCheckpointByTile(tile)<<8) | OT_GOTO_CHECKPOINT;
+
if (IS_TILETYPE(tile, MP_STATION)) {
st = DEREF_STATION(st_index = _map2[tile]);