diff options
author | yexo <yexo@openttd.org> | 2011-03-03 19:26:18 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2011-03-03 19:26:18 +0000 |
commit | 3769b4f218a761fb31f3cfbd636a4d9e9365b4f9 (patch) | |
tree | b892334d5d61fb5685fc906ee766894a56e63e25 | |
parent | 93533b603abf5423cadc0dd02b0ae31ec5b95f7b (diff) | |
download | openttd-3769b4f218a761fb31f3cfbd636a4d9e9365b4f9.tar.xz |
(svn r22163) -Fix [FS#4541]: building a station part adjacent to both an existing station and a rail waypoint failed
-rw-r--r-- | src/station_cmd.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 98b919870..859753325 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -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); } |