(svn r3981) More work for the rail accessing functions and enums

This commit is contained in:
tron
2006-03-19 13:48:08 +00:00
parent 667666f1a3
commit a90e46bf03
8 changed files with 51 additions and 50 deletions

View File

@@ -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;