(svn r4214) -Fix: Do not try to obtain Trackbits for normal rails, bus stops, airports and other non-rail tiles

This commit is contained in:
celestar 2006-03-31 19:01:57 +00:00
parent 736983a06d
commit 1f88ea4ec6

View File

@ -101,9 +101,11 @@ static TrackBits GetRailTrackBitsUniversal(TileIndex t, byte *override)
} }
} }
case MP_STREET: case MP_STREET:
if (!GetRoadType(t) == ROAD_CROSSING) return 0;
if (GetRailTypeCrossing(t) != RAILTYPE_ELECTRIC) return 0; if (GetRailTypeCrossing(t) != RAILTYPE_ELECTRIC) return 0;
return GetCrossingRailBits(t); return GetCrossingRailBits(t);
case MP_STATION: case MP_STATION:
if (!IsRailwayStation(t)) return 0;
if (GetRailType(t) != RAILTYPE_ELECTRIC) return 0; if (GetRailType(t) != RAILTYPE_ELECTRIC) return 0;
return TrackToTrackBits(GetRailStationTrack(t)); return TrackToTrackBits(GetRailStationTrack(t));
default: default: