aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorMelanie2009-10-04 05:49:16 +0100
committerMelanie2009-10-04 05:49:16 +0100
commit6878b26b0d3d9ba26b1afe097e193fb1bafbc9b6 (patch)
tree7e786c0ce436f42a60806629f3249658eab4884a /OpenSim/Region/CoreModules
parentSlightly better message with status code for WebException. (diff)
parentClosing another stream. (diff)
downloadopensim-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')
-rw-r--r--OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs10
3 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
index a0f359b..7456e8c 100644
--- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
+++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs
@@ -257,7 +257,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
257 stringResult.AppendFormat("{0}|{1}|{2}{3}", Layers[i].Start, Layers[i].End, Layers[i].End - Layers[i].Start, strEnd); 257 stringResult.AppendFormat("{0}|{1}|{2}{3}", Layers[i].Start, Layers[i].End, Layers[i].End - Layers[i].Start, strEnd);
258 } 258 }
259 259
260 layerDecodeAsset.Data = Encoding.UTF8.GetBytes(stringResult.ToString()); 260 layerDecodeAsset.Data = Util.UTF8.GetBytes(stringResult.ToString());
261 261
262 #endregion Serialize Layer Data 262 #endregion Serialize Layer Data
263 263
@@ -280,7 +280,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender
280 { 280 {
281 #region Deserialize Layer Data 281 #region Deserialize Layer Data
282 282
283 string readResult = Encoding.UTF8.GetString(layerDecodeAsset.Data); 283 string readResult = Util.UTF8.GetString(layerDecodeAsset.Data);
284 string[] lines = readResult.Split(new char[] { '\n' }, StringSplitOptions.RemoveEmptyEntries); 284 string[] lines = readResult.Split(new char[] { '\n' }, StringSplitOptions.RemoveEmptyEntries);
285 285
286 if (lines.Length == 0) 286 if (lines.Length == 0)
diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
index 50d7c97..45e724d 100644
--- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
+++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs
@@ -367,7 +367,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
367 // Encode outbound data 367 // Encode outbound data
368 if (OutboundBody.Length > 0) 368 if (OutboundBody.Length > 0)
369 { 369 {
370 byte[] data = Encoding.UTF8.GetBytes(OutboundBody); 370 byte[] data = Util.UTF8.GetBytes(OutboundBody);
371 371
372 Request.ContentLength = data.Length; 372 Request.ContentLength = data.Length;
373 Stream bstream = Request.GetRequestStream(); 373 Stream bstream = Request.GetRequestStream();
@@ -390,7 +390,7 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
390 if (count != 0) 390 if (count != 0)
391 { 391 {
392 // translate from bytes to ASCII text 392 // translate from bytes to ASCII text
393 tempString = Encoding.UTF8.GetString(buf, 0, count); 393 tempString = Util.UTF8.GetString(buf, 0, count);
394 394
395 // continue building the string 395 // continue building the string
396 sb.Append(tempString); 396 sb.Append(tempString);
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