summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2010-10-18 17:06:20 +0000
committersmatz <smatz@openttd.org>2010-10-18 17:06:20 +0000
commitbb53464848fd36935176d35fdd76835320a7af2c (patch)
tree091d628ad643bce54c02179a107c0de195e03fcd /src
parent27839d548e53d14716e1f932a0a07351e7bf26b3 (diff)
downloadopenttd-bb53464848fd36935176d35fdd76835320a7af2c.tar.xz
(svn r20990) -Fix: when removing a rail station, don't leave track under non-station tiles
Diffstat (limited to 'src')
-rw-r--r--src/station_cmd.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index c8251258f..85104cc8d 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -1433,9 +1433,11 @@ CommandCost RemoveFromRailBaseStation(TileArea ta, SmallVector<T *, 4> &affected
}
}
+ bool build_rail = keep_rail && !IsStationTileBlocked(tile);
+
DoClearSquare(tile);
DeleteNewGRFInspectWindow(GSF_STATIONS, tile);
- if (keep_rail) MakeRailNormal(tile, owner, TrackToTrackBits(track), rt);
+ if (build_rail) MakeRailNormal(tile, owner, TrackToTrackBits(track), rt);
st->rect.AfterRemoveTile(st, tile);
AddTrackToSignalBuffer(tile, track, owner);