Index: src/water_cmd.cpp =================================================================== --- src/water_cmd.cpp (revision 11015) +++ src/water_cmd.cpp (working copy) @@ -288,15 +288,15 @@ case WATER_TILE_CLEAR: if (flags & DC_NO_WATER) return_cmd_error(STR_3807_CAN_T_BUILD_ON_WATER); - /* Make sure no vehicle is on the tile */ - if (!EnsureNoVehicle(tile)) return CMD_ERROR; - /* Make sure it's not an edge tile. */ if (!IS_INT_INSIDE(TileX(tile), 1, MapMaxX() - 1) || !IS_INT_INSIDE(TileY(tile), 1, MapMaxY() - 1)) { return_cmd_error(STR_0002_TOO_CLOSE_TO_EDGE_OF_MAP); } + /* Make sure no vehicle is on the tile */ + if (!EnsureNoVehicle(tile)) return CMD_ERROR; + if (GetTileOwner(tile) != OWNER_WATER && GetTileOwner(tile) != OWNER_NONE && !CheckTileOwnership(tile)) return CMD_ERROR; if (flags & DC_EXEC) DoClearSquare(tile); @@ -308,12 +308,6 @@ /* Make sure no vehicle is on the tile */ if (!EnsureNoVehicle(tile)) return CMD_ERROR; - /* Make sure it's not an edge tile. */ - if (!IS_INT_INSIDE(TileX(tile), 1, MapMaxX() - 1) || - !IS_INT_INSIDE(TileY(tile), 1, MapMaxY() - 1)) { - return_cmd_error(STR_0002_TOO_CLOSE_TO_EDGE_OF_MAP); - } - if (flags & DC_EXEC) DoClearSquare(tile); if (slope == SLOPE_N || slope == SLOPE_E || slope == SLOPE_S || slope == SLOPE_W) { return CommandCost(_price.clear_water);