summaryrefslogtreecommitdiff
path: root/src/water_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/water_cmd.cpp')
-rw-r--r--src/water_cmd.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index 3c0e6ee2f..78d190d69 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -172,7 +172,6 @@ static CommandCost RemoveShipDepot(TileIndex tile, DoCommandFlag flags)
}
if (flags & DC_EXEC) {
- /* Kill the depot, which is registered at the northernmost tile. Use that one */
delete Depot::GetByTile(tile);
MakeWaterKeepingClass(tile, GetTileOwner(tile));
@@ -1180,9 +1179,7 @@ static TrackStatus GetTileTrackStatus_Water(TileIndex tile, TransportType mode,
static bool ClickTile_Water(TileIndex tile)
{
if (GetWaterTileType(tile) == WATER_TILE_DEPOT) {
- TileIndex tile2 = GetOtherShipDepotTile(tile);
-
- ShowDepotWindow(tile < tile2 ? tile : tile2, VEH_SHIP);
+ ShowDepotWindow(GetShipDepotNorthTile(tile), VEH_SHIP);
return true;
}
return false;