diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs index be1fb24..68d6ed2 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs | |||
@@ -57,6 +57,10 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders | |||
57 | 57 | ||
58 | public LLRAW() | 58 | public LLRAW() |
59 | { | 59 | { |
60 | } | ||
61 | |||
62 | private void BuildLookupHeightTable() | ||
63 | { | ||
60 | LookupHeightTable = new HeightmapLookupValue[256 * 256]; | 64 | LookupHeightTable = new HeightmapLookupValue[256 * 256]; |
61 | 65 | ||
62 | for (int i = 0; i < 256; i++) | 66 | for (int i = 0; i < 256; i++) |
@@ -186,6 +190,9 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders | |||
186 | 190 | ||
187 | public void SaveStream(Stream s, ITerrainChannel map) | 191 | public void SaveStream(Stream s, ITerrainChannel map) |
188 | { | 192 | { |
193 | if (LookupHeightTable == null) | ||
194 | BuildLookupHeightTable(); | ||
195 | |||
189 | using (BinaryWriter binStream = new BinaryWriter(s)) | 196 | using (BinaryWriter binStream = new BinaryWriter(s)) |
190 | { | 197 | { |
191 | // Output the calculated raw | 198 | // Output the calculated raw |
@@ -241,6 +248,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders | |||
241 | } | 248 | } |
242 | } | 249 | } |
243 | } | 250 | } |
251 | LookupHeightTable = null; | ||
244 | } | 252 | } |
245 | 253 | ||
246 | public string FileExtension | 254 | public string FileExtension |
@@ -267,6 +275,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders | |||
267 | public bool SupportsTileSave() | 275 | public bool SupportsTileSave() |
268 | { | 276 | { |
269 | return false; | 277 | return false; |
270 | } | 278 | } |
271 | } | 279 | } |
272 | } \ No newline at end of file | 280 | } \ No newline at end of file |