(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 52e5d9f328
commit 4b74fa1923
8 changed files with 51 additions and 50 deletions

View File

@@ -83,10 +83,8 @@ static void PlaceRail_AutoRail(TileIndex tile)
static void PlaceExtraDepotRail(TileIndex tile, uint16 extra)
{
byte b = _m[tile].m5;
if (GB(b, 6, 2) != RAIL_TYPE_NORMAL >> 6) return;
if (!(b & (extra >> 8))) return;
if (GetRailTileType(tile) != RAIL_TYPE_NORMAL) return;
if ((GetTrackBits(tile) & GB(extra, 8, 8)) == 0) return;
DoCommandP(tile, _cur_railtype, extra & 0xFF, NULL, CMD_BUILD_SINGLE_RAIL | CMD_AUTO | CMD_NO_WATER);
}