summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/rail_cmd.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index 5f96e3d7c..6196d78af 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -2453,7 +2453,7 @@ static void TileLoop_Track(TileIndex tile)
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 tile)
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 tile)
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 tile)
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) {