From a90e46bf03365920f2a13254ec17f1d4f76727f6 Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 19 Mar 2006 13:48:08 +0000 Subject: (svn r3981) More work for the rail accessing functions and enums --- rail_gui.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'rail_gui.c') diff --git a/rail_gui.c b/rail_gui.c index d2fcb1920..f641a551e 100644 --- a/rail_gui.c +++ b/rail_gui.c @@ -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); } -- cgit v1.2.3-54-g00ecf