From bb251f45fc29160b30083b2bcd3ce91f38b3d644 Mon Sep 17 00:00:00 2001 From: glx Date: Sat, 9 May 2020 23:41:01 +0200 Subject: [PATCH] Fix #8119: Update docking area when clearing a shore rail tile --- src/rail_cmd.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index 527e02cb8c..162fe97799 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]); }