summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2020-05-09 23:41:01 +0200
committerCharles Pigott <charlespigott@googlemail.com>2020-05-10 20:10:12 +0100
commit39092ee13b44573d1b8111a5d2ee1d46990f239f (patch)
tree20e825987f7d6a6e937c0e9095dc4d6746e5bd7e /src
parentd6a995fc2ebce51615439a5f55131f02987b5c6e (diff)
downloadopenttd-39092ee13b44573d1b8111a5d2ee1d46990f239f.tar.xz
Fix #8119: Update docking area when clearing a shore rail tile
Diffstat (limited to 'src')
-rw-r--r--src/rail_cmd.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index 527e02cb8..162fe9779 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -1850,7 +1850,11 @@ static CommandCost ClearTile_Track(TileIndex tile, DoCommandFlag flags)
if (ret.Failed()) return ret;
/* The track was removed, and left a coast tile. Now also clear the water. */
- if (flags & DC_EXEC) DoClearSquare(tile);
+ if (flags & DC_EXEC) {
+ bool remove = IsDockingTile(tile);
+ DoClearSquare(tile);
+ if (remove) RemoveDockingTile(tile);
+ }
cost.AddCost(_price[PR_CLEAR_WATER]);
}