From 1f88ea4ec64f7dc8153dff3a8ca0ce20e7789a68 Mon Sep 17 00:00:00 2001 From: celestar Date: Fri, 31 Mar 2006 19:01:57 +0000 Subject: (svn r4214) -Fix: Do not try to obtain Trackbits for normal rails, bus stops, airports and other non-rail tiles --- elrail.c | 2 ++ 1 file changed, 2 insertions(+) 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: -- cgit v1.2.3-70-g09d2