Fix #8119: Update docking area when clearing a shore rail tile

pull/174/head
glx 4 years ago committed by Charles Pigott
parent d6a995fc2e
commit 39092ee13b

@ -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]);
}

Loading…
Cancel
Save