summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--elrail.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/elrail.c b/elrail.c
index 2f4671141..4d6d6eedc 100644
--- a/elrail.c
+++ b/elrail.c
@@ -101,9 +101,11 @@ static TrackBits GetRailTrackBitsUniversal(TileIndex t, byte *override)
}
}
case MP_STREET:
+ if (!GetRoadType(t) == ROAD_CROSSING) return 0;
if (GetRailTypeCrossing(t) != RAILTYPE_ELECTRIC) return 0;
return GetCrossingRailBits(t);
case MP_STATION:
+ if (!IsRailwayStation(t)) return 0;
if (GetRailType(t) != RAILTYPE_ELECTRIC) return 0;
return TrackToTrackBits(GetRailStationTrack(t));
default: