# HG changeset patch # User yexo # Date 2011-11-08 17:51:29 # Node ID 48f72a1979ae7a39419dc6b722dcab39a28b63b9 # Parent 1f679032452f3d03b8268e2cf1c75510e223ea38 (svn r23163) -Fix [FS#4627]: don't display railway fences between track and waypoints (Krille) diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -2453,7 +2453,7 @@ static void TileLoop_Track(TileIndex til TileIndex n = tile + TileDiffXY(0, -1); TrackBits nrail = (IsPlainRailTile(n) ? GetTrackBits(n) : TRACK_BIT_NONE); - if (!IsTileType(n, MP_RAILWAY) || + if ((!IsTileType(n, MP_RAILWAY) && !IsRailWaypointTile(n)) || !IsTileOwner(n, owner) || nrail == TRACK_BIT_UPPER || nrail == TRACK_BIT_LEFT) { @@ -2468,7 +2468,7 @@ static void TileLoop_Track(TileIndex til TileIndex n = tile + TileDiffXY(0, 1); TrackBits nrail = (IsPlainRailTile(n) ? GetTrackBits(n) : TRACK_BIT_NONE); - if (!IsTileType(n, MP_RAILWAY) || + if ((!IsTileType(n, MP_RAILWAY) && !IsRailWaypointTile(n)) || !IsTileOwner(n, owner) || nrail == TRACK_BIT_LOWER || nrail == TRACK_BIT_RIGHT) { @@ -2484,7 +2484,7 @@ static void TileLoop_Track(TileIndex til TileIndex n = tile + TileDiffXY(-1, 0); TrackBits nrail = (IsPlainRailTile(n) ? GetTrackBits(n) : TRACK_BIT_NONE); - if (!IsTileType(n, MP_RAILWAY) || + if ((!IsTileType(n, MP_RAILWAY) && !IsRailWaypointTile(n)) || !IsTileOwner(n, owner) || nrail == TRACK_BIT_UPPER || nrail == TRACK_BIT_RIGHT) { @@ -2499,7 +2499,7 @@ static void TileLoop_Track(TileIndex til TileIndex n = tile + TileDiffXY(1, 0); TrackBits nrail = (IsPlainRailTile(n) ? GetTrackBits(n) : TRACK_BIT_NONE); - if (!IsTileType(n, MP_RAILWAY) || + if ((!IsTileType(n, MP_RAILWAY) && !IsRailWaypointTile(n)) || !IsTileOwner(n, owner) || nrail == TRACK_BIT_LOWER || nrail == TRACK_BIT_LEFT) {