summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-06-12 13:40:07 +0000
committersmatz <smatz@openttd.org>2008-06-12 13:40:07 +0000
commit39b397438c74243f9dae0bfe7ee9872a0ec24d2b (patch)
tree87a7f07e902497d1fce8f17ecd587127b6784213
parent43622f95e1a95d4a1d3b5f6ce107adf8983ddd1a (diff)
downloadopenttd-39b397438c74243f9dae0bfe7ee9872a0ec24d2b.tar.xz
(svn r13488) -Fix (r13485): track wasn't removed on company bankrupcy when there was a ship on lower halftile
-rw-r--r--src/rail_cmd.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index d1ad5853b..7325c8c96 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -1382,7 +1382,8 @@ static CommandCost ClearTile_Track(TileIndex tile, byte flags)
cost.AddCost(ret);
}
- if (water_ground) {
+ /* when bankrupting, don't make water dirty, there could be a ship on lower halftile */
+ if (water_ground && !(flags & DC_BANKRUPT)) {
if (!EnsureNoVehicleOnGround(tile)) return CMD_ERROR;
/* The track was removed, and left a coast tile. Now also clear the water. */