diff options
author | Melanie | 2009-10-04 05:49:16 +0100 |
---|---|---|
committer | Melanie | 2009-10-04 05:49:16 +0100 |
commit | 6878b26b0d3d9ba26b1afe097e193fb1bafbc9b6 (patch) | |
tree | 7e786c0ce436f42a60806629f3249658eab4884a /OpenSim/Region/CoreModules/World/Terrain/FileLoaders | |
parent | Slightly better message with status code for WebException. (diff) | |
parent | Closing another stream. (diff) | |
download | opensim-SC_OLD-6878b26b0d3d9ba26b1afe097e193fb1bafbc9b6.zip opensim-SC_OLD-6878b26b0d3d9ba26b1afe097e193fb1bafbc9b6.tar.gz opensim-SC_OLD-6878b26b0d3d9ba26b1afe097e193fb1bafbc9b6.tar.bz2 opensim-SC_OLD-6878b26b0d3d9ba26b1afe097e193fb1bafbc9b6.tar.xz |
Merge branch 'diva-textures-osgrid'
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Terrain/FileLoaders')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs index 3eb7cd2..a70ef13 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs | |||
@@ -36,10 +36,10 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders | |||
36 | { | 36 | { |
37 | public struct HeightmapLookupValue : IComparable<HeightmapLookupValue> | 37 | public struct HeightmapLookupValue : IComparable<HeightmapLookupValue> |
38 | { | 38 | { |
39 | public int Index; | 39 | public ushort Index; |
40 | public double Value; | 40 | public float Value; |
41 | 41 | ||
42 | public HeightmapLookupValue(int index, double value) | 42 | public HeightmapLookupValue(ushort index, float value) |
43 | { | 43 | { |
44 | Index = index; | 44 | Index = index; |
45 | Value = value; | 45 | Value = value; |
@@ -62,7 +62,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders | |||
62 | { | 62 | { |
63 | for (int j = 0; j < 256; j++) | 63 | for (int j = 0; j < 256; j++) |
64 | { | 64 | { |
65 | LookupHeightTable[i + (j * 256)] = new HeightmapLookupValue(i + (j * 256), ((double)i * ((double)j / 128.0d))); | 65 | LookupHeightTable[i + (j * 256)] = new HeightmapLookupValue((ushort)(i + (j * 256)), (float)((double)i * ((double)j / 128.0d))); |
66 | } | 66 | } |
67 | } | 67 | } |
68 | Array.Sort<HeightmapLookupValue>(LookupHeightTable); | 68 | Array.Sort<HeightmapLookupValue>(LookupHeightTable); |
@@ -196,7 +196,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders | |||
196 | 196 | ||
197 | // The lookup table is pre-sorted, so we either find an exact match or | 197 | // The lookup table is pre-sorted, so we either find an exact match or |
198 | // the next closest (smaller) match with a binary search | 198 | // the next closest (smaller) match with a binary search |
199 | index = Array.BinarySearch<HeightmapLookupValue>(LookupHeightTable, new HeightmapLookupValue(0, t)); | 199 | index = Array.BinarySearch<HeightmapLookupValue>(LookupHeightTable, new HeightmapLookupValue(0, (float)t)); |
200 | if (index < 0) | 200 | if (index < 0) |
201 | index = ~index - 1; | 201 | index = ~index - 1; |
202 | 202 | ||