mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r22163) -Fix [FS#4541]: building a station part adjacent to both an existing station and a rail waypoint failed
This commit is contained in:
parent
93533b603a
commit
3769b4f218
|
@ -92,9 +92,10 @@ CommandCost GetStationAround(TileArea ta, StationID closest_station, T **st)
|
|||
TILE_AREA_LOOP(tile_cur, ta) {
|
||||
if (IsTileType(tile_cur, MP_STATION)) {
|
||||
StationID t = GetStationIndex(tile_cur);
|
||||
if (!T::IsValidID(t)) continue;
|
||||
|
||||
if (closest_station == INVALID_STATION) {
|
||||
if (T::IsValidID(t)) closest_station = t;
|
||||
closest_station = t;
|
||||
} else if (closest_station != t) {
|
||||
return_cmd_error(STR_ERROR_ADJOINS_MORE_THAN_ONE_EXISTING);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue