diff options
author | Jeff Ames | 2008-08-18 00:39:10 +0000 |
---|---|---|
committer | Jeff Ames | 2008-08-18 00:39:10 +0000 |
commit | 6ef9d4da901a346c232458317cca6268da888e2e (patch) | |
tree | dd1d935b10f34f261839da9f9879c02322e8ede7 /OpenSim/Region/Environment/Modules/World/Terrain | |
parent | Update svn properties, minor formatting cleanup. (diff) | |
download | opensim-SC-6ef9d4da901a346c232458317cca6268da888e2e.zip opensim-SC-6ef9d4da901a346c232458317cca6268da888e2e.tar.gz opensim-SC-6ef9d4da901a346c232458317cca6268da888e2e.tar.bz2 opensim-SC-6ef9d4da901a346c232458317cca6268da888e2e.tar.xz |
Formatting cleanup.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Terrain')
11 files changed, 56 insertions, 56 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs index 34bbf78..48da96d 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/BMP.cs | |||
@@ -51,7 +51,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
51 | 51 | ||
52 | colours.Save(filename, ImageFormat.Bmp); | 52 | colours.Save(filename, ImageFormat.Bmp); |
53 | } | 53 | } |
54 | 54 | ||
55 | /// <summary> | 55 | /// <summary> |
56 | /// Exports a stream using a System.Drawing exporter. | 56 | /// Exports a stream using a System.Drawing exporter. |
57 | /// </summary> | 57 | /// </summary> |
@@ -62,7 +62,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
62 | Bitmap colours = CreateGrayscaleBitmapFromMap(map); | 62 | Bitmap colours = CreateGrayscaleBitmapFromMap(map); |
63 | 63 | ||
64 | colours.Save(stream, ImageFormat.Png); | 64 | colours.Save(stream, ImageFormat.Png); |
65 | } | 65 | } |
66 | 66 | ||
67 | /// <summary> | 67 | /// <summary> |
68 | /// The human readable version of the file format(s) this loader handles | 68 | /// The human readable version of the file format(s) this loader handles |
@@ -73,4 +73,4 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
73 | return "BMP"; | 73 | return "BMP"; |
74 | } | 74 | } |
75 | } | 75 | } |
76 | } \ No newline at end of file | 76 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GIF.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GIF.cs index 0cd9000..accffd2 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GIF.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GIF.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
40 | 40 | ||
41 | colours.Save(filename, ImageFormat.Gif); | 41 | colours.Save(filename, ImageFormat.Gif); |
42 | } | 42 | } |
43 | 43 | ||
44 | /// <summary> | 44 | /// <summary> |
45 | /// Exports a stream using a System.Drawing exporter. | 45 | /// Exports a stream using a System.Drawing exporter. |
46 | /// </summary> | 46 | /// </summary> |
@@ -51,11 +51,11 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
51 | Bitmap colours = CreateGrayscaleBitmapFromMap(map); | 51 | Bitmap colours = CreateGrayscaleBitmapFromMap(map); |
52 | 52 | ||
53 | colours.Save(stream, ImageFormat.Gif); | 53 | colours.Save(stream, ImageFormat.Gif); |
54 | } | 54 | } |
55 | 55 | ||
56 | public override string ToString() | 56 | public override string ToString() |
57 | { | 57 | { |
58 | return "GIF"; | 58 | return "GIF"; |
59 | } | 59 | } |
60 | } | 60 | } |
61 | } \ No newline at end of file | 61 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs index 4d213e0..983ad29 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/GenericSystemDrawing.cs | |||
@@ -58,19 +58,19 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
58 | /// <returns>A terrain channel generated from the image.</returns> | 58 | /// <returns>A terrain channel generated from the image.</returns> |
59 | public virtual ITerrainChannel LoadFile(string filename) | 59 | public virtual ITerrainChannel LoadFile(string filename) |
60 | { | 60 | { |
61 | return LoadBitmap(new Bitmap(filename)); | 61 | return LoadBitmap(new Bitmap(filename)); |
62 | } | 62 | } |
63 | 63 | ||
64 | public ITerrainChannel LoadFile(string filename, int x, int y, int fileWidth, int fileHeight, int w, int h) | 64 | public ITerrainChannel LoadFile(string filename, int x, int y, int fileWidth, int fileHeight, int w, int h) |
65 | { | 65 | { |
66 | throw new NotImplementedException(); | 66 | throw new NotImplementedException(); |
67 | } | 67 | } |
68 | 68 | ||
69 | public virtual ITerrainChannel LoadStream(Stream stream) | 69 | public virtual ITerrainChannel LoadStream(Stream stream) |
70 | { | 70 | { |
71 | return LoadBitmap(new Bitmap(stream)); | 71 | return LoadBitmap(new Bitmap(stream)); |
72 | } | 72 | } |
73 | 73 | ||
74 | protected virtual ITerrainChannel LoadBitmap(Bitmap bitmap) | 74 | protected virtual ITerrainChannel LoadBitmap(Bitmap bitmap) |
75 | { | 75 | { |
76 | ITerrainChannel retval = new TerrainChannel(bitmap.Width, bitmap.Height); | 76 | ITerrainChannel retval = new TerrainChannel(bitmap.Width, bitmap.Height); |
@@ -85,7 +85,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
85 | } | 85 | } |
86 | } | 86 | } |
87 | 87 | ||
88 | return retval; | 88 | return retval; |
89 | } | 89 | } |
90 | 90 | ||
91 | /// <summary> | 91 | /// <summary> |
@@ -99,7 +99,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
99 | 99 | ||
100 | colours.Save(filename, ImageFormat.Png); | 100 | colours.Save(filename, ImageFormat.Png); |
101 | } | 101 | } |
102 | 102 | ||
103 | /// <summary> | 103 | /// <summary> |
104 | /// Exports a stream using a System.Drawing exporter. | 104 | /// Exports a stream using a System.Drawing exporter. |
105 | /// </summary> | 105 | /// </summary> |
@@ -110,7 +110,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
110 | Bitmap colours = CreateGrayscaleBitmapFromMap(map); | 110 | Bitmap colours = CreateGrayscaleBitmapFromMap(map); |
111 | 111 | ||
112 | colours.Save(stream, ImageFormat.Png); | 112 | colours.Save(stream, ImageFormat.Png); |
113 | } | 113 | } |
114 | 114 | ||
115 | #endregion | 115 | #endregion |
116 | 116 | ||
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/JPEG.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/JPEG.cs index 9886b81..35576c7 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/JPEG.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/JPEG.cs | |||
@@ -51,11 +51,11 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
51 | { | 51 | { |
52 | throw new NotImplementedException(); | 52 | throw new NotImplementedException(); |
53 | } | 53 | } |
54 | 54 | ||
55 | public ITerrainChannel LoadStream(Stream stream) | 55 | public ITerrainChannel LoadStream(Stream stream) |
56 | { | 56 | { |
57 | throw new NotImplementedException(); | 57 | throw new NotImplementedException(); |
58 | } | 58 | } |
59 | 59 | ||
60 | public void SaveFile(string filename, ITerrainChannel map) | 60 | public void SaveFile(string filename, ITerrainChannel map) |
61 | { | 61 | { |
@@ -63,7 +63,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
63 | 63 | ||
64 | colours.Save(filename, ImageFormat.Jpeg); | 64 | colours.Save(filename, ImageFormat.Jpeg); |
65 | } | 65 | } |
66 | 66 | ||
67 | /// <summary> | 67 | /// <summary> |
68 | /// Exports a stream using a System.Drawing exporter. | 68 | /// Exports a stream using a System.Drawing exporter. |
69 | /// </summary> | 69 | /// </summary> |
@@ -74,7 +74,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
74 | Bitmap colours = CreateBitmapFromMap(map); | 74 | Bitmap colours = CreateBitmapFromMap(map); |
75 | 75 | ||
76 | colours.Save(stream, ImageFormat.Jpeg); | 76 | colours.Save(stream, ImageFormat.Jpeg); |
77 | } | 77 | } |
78 | 78 | ||
79 | #endregion | 79 | #endregion |
80 | 80 | ||
@@ -109,4 +109,4 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
109 | return bmp; | 109 | return bmp; |
110 | } | 110 | } |
111 | } | 111 | } |
112 | } \ No newline at end of file | 112 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/LLRAW.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/LLRAW.cs index 21fba2b..5f13d01 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/LLRAW.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/LLRAW.cs | |||
@@ -74,7 +74,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
74 | FileInfo file = new FileInfo(filename); | 74 | FileInfo file = new FileInfo(filename); |
75 | FileStream s = file.Open(FileMode.Open, FileAccess.Read); | 75 | FileStream s = file.Open(FileMode.Open, FileAccess.Read); |
76 | ITerrainChannel retval = LoadStream(s); | 76 | ITerrainChannel retval = LoadStream(s); |
77 | 77 | ||
78 | s.Close(); | 78 | s.Close(); |
79 | 79 | ||
80 | return retval; | 80 | return retval; |
@@ -113,7 +113,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
113 | // i.e. eat X upto where we start | 113 | // i.e. eat X upto where we start |
114 | while (currFileXOffset < offsetX) | 114 | while (currFileXOffset < offsetX) |
115 | { | 115 | { |
116 | bs.ReadBytes(sectionWidth * 13); | 116 | bs.ReadBytes(sectionWidth * 13); |
117 | currFileXOffset++; | 117 | currFileXOffset++; |
118 | } | 118 | } |
119 | 119 | ||
@@ -143,11 +143,11 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
143 | 143 | ||
144 | return retval; | 144 | return retval; |
145 | } | 145 | } |
146 | 146 | ||
147 | public ITerrainChannel LoadStream(Stream s) | 147 | public ITerrainChannel LoadStream(Stream s) |
148 | { | 148 | { |
149 | TerrainChannel retval = new TerrainChannel(); | 149 | TerrainChannel retval = new TerrainChannel(); |
150 | 150 | ||
151 | BinaryReader bs = new BinaryReader(s); | 151 | BinaryReader bs = new BinaryReader(s); |
152 | int y; | 152 | int y; |
153 | for (y = 0; y < retval.Height; y++) | 153 | for (y = 0; y < retval.Height; y++) |
@@ -160,8 +160,8 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
160 | } | 160 | } |
161 | } | 161 | } |
162 | 162 | ||
163 | bs.Close(); | 163 | bs.Close(); |
164 | 164 | ||
165 | return retval; | 165 | return retval; |
166 | } | 166 | } |
167 | 167 | ||
@@ -173,7 +173,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
173 | 173 | ||
174 | s.Close(); | 174 | s.Close(); |
175 | } | 175 | } |
176 | 176 | ||
177 | public void SaveStream(Stream s, ITerrainChannel map) | 177 | public void SaveStream(Stream s, ITerrainChannel map) |
178 | { | 178 | { |
179 | BinaryWriter binStream = new BinaryWriter(s); | 179 | BinaryWriter binStream = new BinaryWriter(s); |
@@ -224,9 +224,9 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
224 | } | 224 | } |
225 | } | 225 | } |
226 | 226 | ||
227 | binStream.Close(); | 227 | binStream.Close(); |
228 | } | 228 | } |
229 | 229 | ||
230 | public string FileExtension | 230 | public string FileExtension |
231 | { | 231 | { |
232 | get { return ".raw"; } | 232 | get { return ".raw"; } |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/PNG.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/PNG.cs index cf95486..19e181e 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/PNG.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/PNG.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
40 | 40 | ||
41 | colours.Save(filename, ImageFormat.Png); | 41 | colours.Save(filename, ImageFormat.Png); |
42 | } | 42 | } |
43 | 43 | ||
44 | /// <summary> | 44 | /// <summary> |
45 | /// Exports a stream using a System.Drawing exporter. | 45 | /// Exports a stream using a System.Drawing exporter. |
46 | /// </summary> | 46 | /// </summary> |
@@ -51,11 +51,11 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
51 | Bitmap colours = CreateGrayscaleBitmapFromMap(map); | 51 | Bitmap colours = CreateGrayscaleBitmapFromMap(map); |
52 | 52 | ||
53 | colours.Save(stream, ImageFormat.Png); | 53 | colours.Save(stream, ImageFormat.Png); |
54 | } | 54 | } |
55 | 55 | ||
56 | public override string ToString() | 56 | public override string ToString() |
57 | { | 57 | { |
58 | return "PNG"; | 58 | return "PNG"; |
59 | } | 59 | } |
60 | } | 60 | } |
61 | } \ No newline at end of file | 61 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/RAW32.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/RAW32.cs index bb8b0f7..758821a 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/RAW32.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/RAW32.cs | |||
@@ -112,11 +112,11 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
112 | 112 | ||
113 | return retval; | 113 | return retval; |
114 | } | 114 | } |
115 | 115 | ||
116 | public ITerrainChannel LoadStream(Stream s) | 116 | public ITerrainChannel LoadStream(Stream s) |
117 | { | 117 | { |
118 | TerrainChannel retval = new TerrainChannel(); | 118 | TerrainChannel retval = new TerrainChannel(); |
119 | 119 | ||
120 | BinaryReader bs = new BinaryReader(s); | 120 | BinaryReader bs = new BinaryReader(s); |
121 | int y; | 121 | int y; |
122 | for (y = 0; y < retval.Height; y++) | 122 | for (y = 0; y < retval.Height; y++) |
@@ -129,10 +129,10 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
129 | } | 129 | } |
130 | 130 | ||
131 | bs.Close(); | 131 | bs.Close(); |
132 | 132 | ||
133 | return retval; | 133 | return retval; |
134 | } | 134 | } |
135 | 135 | ||
136 | public void SaveFile(string filename, ITerrainChannel map) | 136 | public void SaveFile(string filename, ITerrainChannel map) |
137 | { | 137 | { |
138 | FileInfo file = new FileInfo(filename); | 138 | FileInfo file = new FileInfo(filename); |
@@ -141,7 +141,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
141 | 141 | ||
142 | s.Close(); | 142 | s.Close(); |
143 | } | 143 | } |
144 | 144 | ||
145 | public void SaveStream(Stream s, ITerrainChannel map) | 145 | public void SaveStream(Stream s, ITerrainChannel map) |
146 | { | 146 | { |
147 | BinaryWriter bs = new BinaryWriter(s); | 147 | BinaryWriter bs = new BinaryWriter(s); |
@@ -156,7 +156,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
156 | } | 156 | } |
157 | } | 157 | } |
158 | 158 | ||
159 | bs.Close(); | 159 | bs.Close(); |
160 | } | 160 | } |
161 | 161 | ||
162 | #endregion | 162 | #endregion |
@@ -166,4 +166,4 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
166 | return "RAW32"; | 166 | return "RAW32"; |
167 | } | 167 | } |
168 | } | 168 | } |
169 | } \ No newline at end of file | 169 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/TIFF.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/TIFF.cs index 3f98f40..95b43b0 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/TIFF.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/TIFF.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
40 | 40 | ||
41 | colours.Save(filename, ImageFormat.Tiff); | 41 | colours.Save(filename, ImageFormat.Tiff); |
42 | } | 42 | } |
43 | 43 | ||
44 | /// <summary> | 44 | /// <summary> |
45 | /// Exports a stream using a System.Drawing exporter. | 45 | /// Exports a stream using a System.Drawing exporter. |
46 | /// </summary> | 46 | /// </summary> |
@@ -51,11 +51,11 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
51 | Bitmap colours = CreateGrayscaleBitmapFromMap(map); | 51 | Bitmap colours = CreateGrayscaleBitmapFromMap(map); |
52 | 52 | ||
53 | colours.Save(stream, ImageFormat.Tiff); | 53 | colours.Save(stream, ImageFormat.Tiff); |
54 | } | 54 | } |
55 | 55 | ||
56 | public override string ToString() | 56 | public override string ToString() |
57 | { | 57 | { |
58 | return "TIFF"; | 58 | return "TIFF"; |
59 | } | 59 | } |
60 | } | 60 | } |
61 | } \ No newline at end of file | 61 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs index 5dc2aa5..2bf029e 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs | |||
@@ -51,11 +51,11 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
51 | 51 | ||
52 | return retval; | 52 | return retval; |
53 | } | 53 | } |
54 | 54 | ||
55 | public ITerrainChannel LoadStream(Stream s) | 55 | public ITerrainChannel LoadStream(Stream s) |
56 | { | 56 | { |
57 | TerrainChannel retval = new TerrainChannel(); | 57 | TerrainChannel retval = new TerrainChannel(); |
58 | 58 | ||
59 | BinaryReader bs = new BinaryReader(s); | 59 | BinaryReader bs = new BinaryReader(s); |
60 | 60 | ||
61 | bool eof = false; | 61 | bool eof = false; |
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
107 | } | 107 | } |
108 | 108 | ||
109 | bs.Close(); | 109 | bs.Close(); |
110 | 110 | ||
111 | return retval; | 111 | return retval; |
112 | } | 112 | } |
113 | 113 | ||
@@ -115,7 +115,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
115 | { | 115 | { |
116 | throw new NotImplementedException(); | 116 | throw new NotImplementedException(); |
117 | } | 117 | } |
118 | 118 | ||
119 | public void SaveStream(Stream stream, ITerrainChannel map) | 119 | public void SaveStream(Stream stream, ITerrainChannel map) |
120 | { | 120 | { |
121 | throw new NotImplementedException(); | 121 | throw new NotImplementedException(); |
@@ -138,4 +138,4 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
138 | return "Terragen"; | 138 | return "Terragen"; |
139 | } | 139 | } |
140 | } | 140 | } |
141 | } \ No newline at end of file | 141 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainModule.cs b/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainModule.cs index e255515..beeff03 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/ITerrainModule.cs | |||
@@ -33,7 +33,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain | |||
33 | { | 33 | { |
34 | void LoadFromFile(string filename); | 34 | void LoadFromFile(string filename); |
35 | void SaveToFile(string filename); | 35 | void SaveToFile(string filename); |
36 | 36 | ||
37 | /// <summary> | 37 | /// <summary> |
38 | /// Load a terrain from a stream. | 38 | /// Load a terrain from a stream. |
39 | /// </summary> | 39 | /// </summary> |
@@ -42,7 +42,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain | |||
42 | /// </param> | 42 | /// </param> |
43 | /// <param name="stream"></param> | 43 | /// <param name="stream"></param> |
44 | void LoadFromStream(string filename, Stream stream); | 44 | void LoadFromStream(string filename, Stream stream); |
45 | 45 | ||
46 | /// <summary> | 46 | /// <summary> |
47 | /// Save a terrain to a stream. | 47 | /// Save a terrain to a stream. |
48 | /// </summary> | 48 | /// </summary> |
@@ -51,7 +51,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain | |||
51 | /// </param> | 51 | /// </param> |
52 | /// <param name="stream"></param> | 52 | /// <param name="stream"></param> |
53 | void SaveToStream(string filename, Stream stream); | 53 | void SaveToStream(string filename, Stream stream); |
54 | 54 | ||
55 | void InstallPlugin(string name, ITerrainEffect plug); | 55 | void InstallPlugin(string name, ITerrainEffect plug); |
56 | } | 56 | } |
57 | } | 57 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs index 8fbc62e..4a62446 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs | |||
@@ -221,7 +221,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain | |||
221 | throw new TerrainException(String.Format("Unable to save heightmap: saving of this file format not implemented")); | 221 | throw new TerrainException(String.Format("Unable to save heightmap: saving of this file format not implemented")); |
222 | } | 222 | } |
223 | } | 223 | } |
224 | 224 | ||
225 | /// <summary> | 225 | /// <summary> |
226 | /// Loads a terrain file from a stream and installs it in the scene. | 226 | /// Loads a terrain file from a stream and installs it in the scene. |
227 | /// </summary> | 227 | /// </summary> |
@@ -281,7 +281,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain | |||
281 | m_log.Error("Unable to save to " + filename + ", saving of this file format has not been implemented."); | 281 | m_log.Error("Unable to save to " + filename + ", saving of this file format has not been implemented."); |
282 | throw new TerrainException(String.Format("Unable to save heightmap: saving of this file format not implemented")); | 282 | throw new TerrainException(String.Format("Unable to save heightmap: saving of this file format not implemented")); |
283 | } | 283 | } |
284 | } | 284 | } |
285 | 285 | ||
286 | #region Plugin Loading Methods | 286 | #region Plugin Loading Methods |
287 | 287 | ||
@@ -450,7 +450,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain | |||
450 | m_tainted = false; | 450 | m_tainted = false; |
451 | m_scene.PhysicsScene.SetTerrain(m_channel.GetFloatsSerialised()); | 451 | m_scene.PhysicsScene.SetTerrain(m_channel.GetFloatsSerialised()); |
452 | m_scene.SaveTerrain(); | 452 | m_scene.SaveTerrain(); |
453 | 453 | ||
454 | // Clients who look at the map will never see changes after they looked at the map, so i've commented this out. | 454 | // Clients who look at the map will never see changes after they looked at the map, so i've commented this out. |
455 | //m_scene.CreateTerrainTexture(true); | 455 | //m_scene.CreateTerrainTexture(true); |
456 | } | 456 | } |
@@ -517,11 +517,11 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain | |||
517 | // fixup and height deltas that don't respect them | 517 | // fixup and height deltas that don't respect them |
518 | if (respectEstateSettings && LimitChannelChanges(x, y)) | 518 | if (respectEstateSettings && LimitChannelChanges(x, y)) |
519 | { | 519 | { |
520 | // this has been vetoed, so update | 520 | // this has been vetoed, so update |
521 | // what we are going to send to the client | 521 | // what we are going to send to the client |
522 | serialised = m_channel.GetFloatsSerialised(); | 522 | serialised = m_channel.GetFloatsSerialised(); |
523 | } | 523 | } |
524 | 524 | ||
525 | SendToClients(serialised, x, y); | 525 | SendToClients(serialised, x, y); |
526 | shouldTaint = true; | 526 | shouldTaint = true; |
527 | } | 527 | } |
@@ -580,9 +580,9 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain | |||
580 | private void SendToClients(float[] serialised, int x, int y) | 580 | private void SendToClients(float[] serialised, int x, int y) |
581 | { | 581 | { |
582 | m_scene.ForEachClient( | 582 | m_scene.ForEachClient( |
583 | delegate(IClientAPI controller) | 583 | delegate(IClientAPI controller) |
584 | { controller.SendLayerData( | 584 | { controller.SendLayerData( |
585 | x / Constants.TerrainPatchSize, y / Constants.TerrainPatchSize, serialised); | 585 | x / Constants.TerrainPatchSize, y / Constants.TerrainPatchSize, serialised); |
586 | } | 586 | } |
587 | ); | 587 | ); |
588 | } | 588 | } |
@@ -647,7 +647,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain | |||
647 | { | 647 | { |
648 | // Not a good permissions check (see client_OnModifyTerrain above), need to check the entire area. | 648 | // Not a good permissions check (see client_OnModifyTerrain above), need to check the entire area. |
649 | // for now check a point in the centre of the region | 649 | // for now check a point in the centre of the region |
650 | 650 | ||
651 | if (m_scene.ExternalChecks.ExternalChecksCanTerraformLand(remoteClient.AgentId, new LLVector3(127, 127, 0))) | 651 | if (m_scene.ExternalChecks.ExternalChecksCanTerraformLand(remoteClient.AgentId, new LLVector3(127, 127, 0))) |
652 | { | 652 | { |
653 | InterfaceBakeTerrain(null); //bake terrain does not use the passed in parameter | 653 | InterfaceBakeTerrain(null); //bake terrain does not use the passed in parameter |