mirror of https://github.com/OpenTTD/OpenTTD
Fix #8119: Update docking area when clearing a shore rail tile
parent
d6a995fc2e
commit
39092ee13b
|
@ -1850,7 +1850,11 @@ static CommandCost ClearTile_Track(TileIndex tile, DoCommandFlag flags)
|
||||||
if (ret.Failed()) return ret;
|
if (ret.Failed()) return ret;
|
||||||
|
|
||||||
/* The track was removed, and left a coast tile. Now also clear the water. */
|
/* 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]);
|
cost.AddCost(_price[PR_CLEAR_WATER]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue