mirror of https://github.com/OpenTTD/OpenTTD
(svn r329) Fix: [ 1035066 ] 'Allow goto depot' turned off, no checkpoints in orders
parent
edf841fb6f
commit
a99ac0d057
10
order_gui.c
10
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 (v->type == VEH_Train && _map_owner[tile] == _local_player) {
|
||||||
if ((_map5[tile]&0xFC)==0xC0)
|
if ((_map5[tile]&0xFC)==0xC0)
|
||||||
return (GetDepotByTile(tile)<<8) | OT_GOTO_DEPOT | OF_UNLOAD;
|
return (GetDepotByTile(tile)<<8) | OT_GOTO_DEPOT | OF_UNLOAD;
|
||||||
|
|
||||||
if ((_map5[tile]&0xFE)==0xC4)
|
|
||||||
return (GetCheckpointByTile(tile)<<8) | OT_GOTO_CHECKPOINT;
|
|
||||||
}
|
}
|
||||||
break;
|
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)) {
|
if (IS_TILETYPE(tile, MP_STATION)) {
|
||||||
st = DEREF_STATION(st_index = _map2[tile]);
|
st = DEREF_STATION(st_index = _map2[tile]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue