aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2019-01-21 06:05:21 +0000
committerUbitUmarov2019-01-21 06:05:21 +0000
commit33a062612f9fafcb7b4c0e8ac60937c448ce3c10 (patch)
treee6d716b001e94e1d9274e0adc4e8513d2aa48148
parentthis looks more like ubode (diff)
downloadopensim-SC-33a062612f9fafcb7b4c0e8ac60937c448ce3c10.zip
opensim-SC-33a062612f9fafcb7b4c0e8ac60937c448ce3c10.tar.gz
opensim-SC-33a062612f9fafcb7b4c0e8ac60937c448ce3c10.tar.bz2
opensim-SC-33a062612f9fafcb7b4c0e8ac60937c448ce3c10.tar.xz
remove terraindata abstraction layer, since we only have heightmap type
-rw-r--r--OpenSim/Data/MySQL/MySQLSimulationData.cs6
-rw-r--r--OpenSim/Data/Null/NullSimulationData.cs2
-rwxr-xr-xOpenSim/Data/PGSQL/PGSQLSimulationData.cs6
-rw-r--r--OpenSim/Framework/TerrainData.cs177
-rw-r--r--OpenSim/Framework/WebUtil.cs4
-rw-r--r--OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/DynamicAttributes/DOExampleModule.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs89
-rw-r--r--OpenSim/Region/Framework/Scenes/TerrainChannel.cs14
-rw-r--r--OpenSim/Region/Framework/Scenes/TerrainCompressor.cs5
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs2
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs10
-rw-r--r--OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs2
13 files changed, 125 insertions, 196 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index c09154d..c5d7c47 100644
--- a/OpenSim/Data/MySQL/MySQLSimulationData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -598,7 +598,7 @@ namespace OpenSim.Data.MySQL
598 // Legacy entry point for when terrain was always a 256x256 hieghtmap 598 // Legacy entry point for when terrain was always a 256x256 hieghtmap
599 public void StoreTerrain(double[,] ter, UUID regionID) 599 public void StoreTerrain(double[,] ter, UUID regionID)
600 { 600 {
601 StoreTerrain(new HeightmapTerrainData(ter), regionID); 601 StoreTerrain(new TerrainData(ter), regionID);
602 } 602 }
603 603
604 public void StoreTerrain(TerrainData terrData, UUID regionID) 604 public void StoreTerrain(TerrainData terrData, UUID regionID)
@@ -1463,7 +1463,7 @@ namespace OpenSim.Data.MySQL
1463 if (!(row["DynAttrs"] is System.DBNull)) 1463 if (!(row["DynAttrs"] is System.DBNull))
1464 prim.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]); 1464 prim.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]);
1465 else 1465 else
1466 prim.DynAttrs = new DAMap(); 1466 prim.DynAttrs = null;
1467 1467
1468 if (!(row["KeyframeMotion"] is DBNull)) 1468 if (!(row["KeyframeMotion"] is DBNull))
1469 { 1469 {
@@ -1880,7 +1880,7 @@ namespace OpenSim.Data.MySQL
1880 else 1880 else
1881 cmd.Parameters.AddWithValue("Vehicle", String.Empty); 1881 cmd.Parameters.AddWithValue("Vehicle", String.Empty);
1882 1882
1883 if (prim.DynAttrs.CountNamespaces > 0) 1883 if (prim.DynAttrs != null && prim.DynAttrs.CountNamespaces > 0)
1884 cmd.Parameters.AddWithValue("DynAttrs", prim.DynAttrs.ToXml()); 1884 cmd.Parameters.AddWithValue("DynAttrs", prim.DynAttrs.ToXml());
1885 else 1885 else
1886 cmd.Parameters.AddWithValue("DynAttrs", null); 1886 cmd.Parameters.AddWithValue("DynAttrs", null);
diff --git a/OpenSim/Data/Null/NullSimulationData.cs b/OpenSim/Data/Null/NullSimulationData.cs
index 7bb6da3..97e4b79 100644
--- a/OpenSim/Data/Null/NullSimulationData.cs
+++ b/OpenSim/Data/Null/NullSimulationData.cs
@@ -151,7 +151,7 @@ namespace OpenSim.Data.Null
151 // Legacy. Just don't do this. 151 // Legacy. Just don't do this.
152 public void StoreTerrain(double[,] ter, UUID regionID) 152 public void StoreTerrain(double[,] ter, UUID regionID)
153 { 153 {
154 TerrainData terrData = new HeightmapTerrainData(ter); 154 TerrainData terrData = new TerrainData(ter);
155 StoreTerrain(terrData, regionID); 155 StoreTerrain(terrData, regionID);
156 } 156 }
157 157
diff --git a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
index 35cd723..569cc80 100755
--- a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
@@ -610,7 +610,7 @@ namespace OpenSim.Data.PGSQL
610 // Legacy entry point for when terrain was always a 256x256 heightmap 610 // Legacy entry point for when terrain was always a 256x256 heightmap
611 public void StoreTerrain(double[,] terrain, UUID regionID) 611 public void StoreTerrain(double[,] terrain, UUID regionID)
612 { 612 {
613 StoreTerrain(new HeightmapTerrainData(terrain), regionID); 613 StoreTerrain(new TerrainData(terrain), regionID);
614 } 614 }
615 615
616 /// <summary> 616 /// <summary>
@@ -1797,7 +1797,7 @@ namespace OpenSim.Data.PGSQL
1797 if (!(primRow["DynAttrs"] is System.DBNull) && (string)primRow["DynAttrs"] != "") 1797 if (!(primRow["DynAttrs"] is System.DBNull) && (string)primRow["DynAttrs"] != "")
1798 prim.DynAttrs = DAMap.FromXml((string)primRow["DynAttrs"]); 1798 prim.DynAttrs = DAMap.FromXml((string)primRow["DynAttrs"]);
1799 else 1799 else
1800 prim.DynAttrs = new DAMap(); 1800 prim.DynAttrs = null;
1801 1801
1802 prim.PhysicsShapeType = Convert.ToByte(primRow["PhysicsShapeType"]); 1802 prim.PhysicsShapeType = Convert.ToByte(primRow["PhysicsShapeType"]);
1803 prim.Density = Convert.ToSingle(primRow["Density"]); 1803 prim.Density = Convert.ToSingle(primRow["Density"]);
@@ -2245,7 +2245,7 @@ namespace OpenSim.Data.PGSQL
2245 else 2245 else
2246 parameters.Add(_Database.CreateParameter("PhysInertia", String.Empty)); 2246 parameters.Add(_Database.CreateParameter("PhysInertia", String.Empty));
2247 2247
2248 if (prim.DynAttrs.CountNamespaces > 0) 2248 if (prim.DynAttrs != null && prim.DynAttrs.CountNamespaces > 0)
2249 parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml())); 2249 parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml()));
2250 else 2250 else
2251 parameters.Add(_Database.CreateParameter("DynAttrs", null)); 2251 parameters.Add(_Database.CreateParameter("DynAttrs", null));
diff --git a/OpenSim/Framework/TerrainData.cs b/OpenSim/Framework/TerrainData.cs
index 7b99427..233c39b 100644
--- a/OpenSim/Framework/TerrainData.cs
+++ b/OpenSim/Framework/TerrainData.cs
@@ -37,56 +37,6 @@ using log4net;
37 37
38namespace OpenSim.Framework 38namespace OpenSim.Framework
39{ 39{
40 public abstract class TerrainData
41 {
42 // Terrain always is a square
43 public int SizeX { get; protected set; }
44 public int SizeY { get; protected set; }
45 public int SizeZ { get; protected set; }
46
47 // A height used when the user doesn't specify anything
48 public const float DefaultTerrainHeight = 21f;
49
50 public abstract float this[int x, int y] { get; set; }
51 // Someday terrain will have caves
52 // at most holes :p
53 public abstract float this[int x, int y, int z] { get; set; }
54
55 public abstract bool IsTaintedAt(int xx, int yy);
56 public abstract bool IsTaintedAt(int xx, int yy, bool clearOnTest);
57 public abstract void TaintAllTerrain();
58 public abstract void ClearTaint();
59
60 public abstract void ClearLand();
61 public abstract void ClearLand(float height);
62
63 // Return a representation of this terrain for storing as a blob in the database.
64 // Returns 'true' to say blob was stored in the 'out' locations.
65 public abstract bool GetDatabaseBlob(out int DBFormatRevisionCode, out Array blob);
66
67 // Given a revision code and a blob from the database, create and return the right type of TerrainData.
68 // The sizes passed are the expected size of the region. The database info will be used to
69 // initialize the heightmap of that sized region with as much data is in the blob.
70 // Return created TerrainData or 'null' if unsuccessful.
71 public static TerrainData CreateFromDatabaseBlobFactory(int pSizeX, int pSizeY, int pSizeZ, int pFormatCode, byte[] pBlob)
72 {
73 // For the moment, there is only one implementation class
74 return new HeightmapTerrainData(pSizeX, pSizeY, pSizeZ, pFormatCode, pBlob);
75 }
76
77 // return a special compressed representation of the heightmap in ushort
78 public abstract float[] GetCompressedMap();
79 public abstract float CompressionFactor { get; }
80
81 public abstract float[] GetFloatsSerialized();
82 public abstract double[,] GetDoubles();
83
84 public abstract void GetPatchMinMax(int px, int py, out float zmin, out float zmax);
85 public abstract void GetPatchBlock(float[] block, int px, int py, float sub, float premult);
86
87 public abstract TerrainData Clone();
88 }
89
90 // The terrain is stored in the database as a blob with a 'revision' field. 40 // The terrain is stored in the database as a blob with a 'revision' field.
91 // Some implementations of terrain storage would fill the revision field with 41 // Some implementations of terrain storage would fill the revision field with
92 // the time the terrain was stored. When real revisions were added and this 42 // the time the terrain was stored. When real revisions were added and this
@@ -116,18 +66,37 @@ namespace OpenSim.Framework
116 RevisionHigh = 1234 66 RevisionHigh = 1234
117 } 67 }
118 68
119 // Version of terrain that is a heightmap. 69 public class TerrainData
120 // This should really be 'LLOptimizedHeightmapTerrainData' as it includes knowledge
121 // of 'patches' which are 16x16 terrain areas which can be sent separately to the viewer.
122 // The heighmap is kept as an array of ushorts. The ushort values are converted to
123 // and from floats by TerrainCompressionFactor.
124 public class HeightmapTerrainData : TerrainData
125 { 70 {
126 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 71 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
127 private static string LogHeader = "[HEIGHTMAP TERRAIN DATA]"; 72 private static string LogHeader = "[TERRAIN DATA]";
73
74 private float[,] m_heightmap;
75 // Remember subregions of the heightmap that has changed.
76 private bool[,] m_taint;
77
78 // legacy CompressionFactor
79 public float CompressionFactor { get; private set; }
128 80
129 // TerrainData.this[x, y] 81 // Terrain always is a square
130 public override float this[int x, int y] 82 public int SizeX { get; protected set; }
83 public int SizeY { get; protected set; }
84 public int SizeZ { get; protected set; }
85
86 // A height used when the user doesn't specify anything
87 public const float DefaultTerrainHeight = 21f;
88
89 // Given a revision code and a blob from the database, create and return the right type of TerrainData.
90 // The sizes passed are the expected size of the region. The database info will be used to
91 // initialize the heightmap of that sized region with as much data is in the blob.
92 // Return created TerrainData or 'null' if unsuccessful.
93 public static TerrainData CreateFromDatabaseBlobFactory(int pSizeX, int pSizeY, int pSizeZ, int pFormatCode, byte[] pBlob)
94 {
95 // For the moment, there is only one implementation class
96 return new TerrainData(pSizeX, pSizeY, pSizeZ, pFormatCode, pBlob);
97 }
98
99 public float this[int x, int y]
131 { 100 {
132 get { return m_heightmap[x, y]; } 101 get { return m_heightmap[x, y]; }
133 set 102 set
@@ -140,21 +109,18 @@ namespace OpenSim.Framework
140 } 109 }
141 } 110 }
142 111
143 // TerrainData.this[x, y, z] 112 public float this[int x, int y, int z]
144 public override float this[int x, int y, int z]
145 { 113 {
146 get { return this[x, y]; } 114 get { return this[x, y]; }
147 set { this[x, y] = value; } 115 set { this[x, y] = value; }
148 } 116 }
149 117
150 // TerrainData.ClearTaint 118 public void ClearTaint()
151 public override void ClearTaint()
152 { 119 {
153 SetAllTaint(false); 120 SetAllTaint(false);
154 } 121 }
155 122
156 // TerrainData.TaintAllTerrain 123 public void TaintAllTerrain()
157 public override void TaintAllTerrain()
158 { 124 {
159 SetAllTaint(true); 125 SetAllTaint(true);
160 } 126 }
@@ -166,13 +132,12 @@ namespace OpenSim.Framework
166 m_taint[ii, jj] = setting; 132 m_taint[ii, jj] = setting;
167 } 133 }
168 134
169 // TerrainData.ClearLand 135 public void ClearLand()
170 public override void ClearLand()
171 { 136 {
172 ClearLand(DefaultTerrainHeight); 137 ClearLand(DefaultTerrainHeight);
173 } 138 }
174 // TerrainData.ClearLand(float) 139
175 public override void ClearLand(float pHeight) 140 public void ClearLand(float pHeight)
176 { 141 {
177 for (int xx = 0; xx < SizeX; xx++) 142 for (int xx = 0; xx < SizeX; xx++)
178 for (int yy = 0; yy < SizeY; yy++) 143 for (int yy = 0; yy < SizeY; yy++)
@@ -182,7 +147,7 @@ namespace OpenSim.Framework
182 // Return 'true' of the patch that contains these region coordinates has been modified. 147 // Return 'true' of the patch that contains these region coordinates has been modified.
183 // Note that checking the taint clears it. 148 // Note that checking the taint clears it.
184 // There is existing code that relies on this feature. 149 // There is existing code that relies on this feature.
185 public override bool IsTaintedAt(int xx, int yy, bool clearOnTest) 150 public bool IsTaintedAt(int xx, int yy, bool clearOnTest)
186 { 151 {
187 int tx = xx / Constants.TerrainPatchSize; 152 int tx = xx / Constants.TerrainPatchSize;
188 int ty = yy / Constants.TerrainPatchSize; 153 int ty = yy / Constants.TerrainPatchSize;
@@ -195,41 +160,22 @@ namespace OpenSim.Framework
195 // Old form that clears the taint flag when we check it. 160 // Old form that clears the taint flag when we check it.
196 // ubit: this dangerus naming should be only check without clear 161 // ubit: this dangerus naming should be only check without clear
197 // keeping for old modules outthere 162 // keeping for old modules outthere
198 public override bool IsTaintedAt(int xx, int yy) 163 public bool IsTaintedAt(int xx, int yy)
199 { 164 {
200 return IsTaintedAt(xx, yy, true /* clearOnTest */); 165 return IsTaintedAt(xx, yy, true /* clearOnTest */);
201 } 166 }
202 167
203 // TerrainData.GetDatabaseBlob 168 // TerrainData.GetDatabaseBlob
204 // The user wants something to store in the database. 169 // The user wants something to store in the database.
205 public override bool GetDatabaseBlob(out int DBRevisionCode, out Array blob) 170 public bool GetDatabaseBlob(out int DBRevisionCode, out Array blob)
206 { 171 {
207 bool ret = false; 172 DBRevisionCode = (int)DBTerrainRevision.Variable2DGzip;
208/* save all as Variable2DGzip 173 blob = ToCompressedTerrainSerializationV2DGzip();
209 if (SizeX == Constants.RegionSize && SizeY == Constants.RegionSize) 174 return true;
210 {
211 DBRevisionCode = (int)DBTerrainRevision.Legacy256;
212 blob = ToLegacyTerrainSerialization();
213 ret = true;
214 }
215 else
216 {
217*/
218 DBRevisionCode = (int)DBTerrainRevision.Variable2DGzip;
219// DBRevisionCode = (int)DBTerrainRevision.Variable2D;
220 blob = ToCompressedTerrainSerializationV2DGzip();
221// blob = ToCompressedTerrainSerializationV2D();
222 ret = true;
223// }
224 return ret;
225 } 175 }
226 176
227 // TerrainData.CompressionFactor
228 private float m_compressionFactor = 100.0f;
229 public override float CompressionFactor { get { return m_compressionFactor; } }
230
231 // TerrainData.GetCompressedMap 177 // TerrainData.GetCompressedMap
232 public override float[] GetCompressedMap() 178 public float[] GetCompressedMap()
233 { 179 {
234 float[] newMap = new float[SizeX * SizeY]; 180 float[] newMap = new float[SizeX * SizeY];
235 181
@@ -241,19 +187,18 @@ namespace OpenSim.Framework
241 return newMap; 187 return newMap;
242 188
243 } 189 }
244 // TerrainData.Clone 190
245 public override TerrainData Clone() 191 public TerrainData Clone()
246 { 192 {
247 HeightmapTerrainData ret = new HeightmapTerrainData(SizeX, SizeY, SizeZ); 193 TerrainData ret = new TerrainData(SizeX, SizeY, SizeZ);
248 ret.m_heightmap = (float[,])this.m_heightmap.Clone(); 194 ret.m_heightmap = (float[,])this.m_heightmap.Clone();
249 return ret; 195 return ret;
250 } 196 }
251 197
252 // TerrainData.GetFloatsSerialized
253 // This one dimensional version is ordered so height = map[y*sizeX+x]; 198 // This one dimensional version is ordered so height = map[y*sizeX+x];
254 // DEPRECATED: don't use this function as it does not retain the dimensions of the terrain 199 // DEPRECATED: don't use this function as it does not retain the dimensions of the terrain
255 // and the caller will probably do the wrong thing if the terrain is not the legacy 256x256. 200 // and the caller will probably do the wrong thing if the terrain is not the legacy 256x256.
256 public override float[] GetFloatsSerialized() 201 public float[] GetFloatsSerialized()
257 { 202 {
258 int points = SizeX * SizeY; 203 int points = SizeX * SizeY;
259 float[] heights = new float[points]; 204 float[] heights = new float[points];
@@ -269,7 +214,7 @@ namespace OpenSim.Framework
269 } 214 }
270 215
271 // TerrainData.GetDoubles 216 // TerrainData.GetDoubles
272 public override double[,] GetDoubles() 217 public double[,] GetDoubles()
273 { 218 {
274 double[,] ret = new double[SizeX, SizeY]; 219 double[,] ret = new double[SizeX, SizeY];
275 for (int xx = 0; xx < SizeX; xx++) 220 for (int xx = 0; xx < SizeX; xx++)
@@ -279,7 +224,7 @@ namespace OpenSim.Framework
279 return ret; 224 return ret;
280 } 225 }
281 226
282 public override unsafe void GetPatchMinMax(int px, int py, out float zmin, out float zmax) 227 public unsafe void GetPatchMinMax(int px, int py, out float zmin, out float zmax)
283 { 228 {
284 zmax = float.MinValue; 229 zmax = float.MinValue;
285 zmin = float.MaxValue; 230 zmin = float.MaxValue;
@@ -304,7 +249,7 @@ namespace OpenSim.Framework
304 } 249 }
305 } 250 }
306 251
307 public override unsafe void GetPatchBlock(float[] _block, int px, int py, float sub, float premult) 252 public unsafe void GetPatchBlock(float[] _block, int px, int py, float sub, float premult)
308 { 253 {
309 int k = 0; 254 int k = 0;
310 int stride = m_heightmap.GetLength(1); 255 int stride = m_heightmap.GetLength(1);
@@ -324,13 +269,8 @@ namespace OpenSim.Framework
324 } 269 }
325 } 270 }
326 271
327 // ============================================================= 272/*
328 273 // that is coded as the float height times the compression factor (usually '100'
329 private float[,] m_heightmap;
330 // Remember subregions of the heightmap that has changed.
331 private bool[,] m_taint;
332
333 // that is coded as the float height times the compression factor (usually '100'
334 // to make for two decimal points). 274 // to make for two decimal points).
335 public short ToCompressedHeightshort(float pHeight) 275 public short ToCompressedHeightshort(float pHeight)
336 { 276 {
@@ -353,6 +293,7 @@ namespace OpenSim.Framework
353 return ushort.MaxValue; 293 return ushort.MaxValue;
354 return (ushort)pHeight; 294 return (ushort)pHeight;
355 } 295 }
296*/
356 297
357 public float FromCompressedHeight(short pHeight) 298 public float FromCompressedHeight(short pHeight)
358 { 299 {
@@ -366,12 +307,12 @@ namespace OpenSim.Framework
366 307
367 // To keep with the legacy theme, create an instance of this class based on the 308 // To keep with the legacy theme, create an instance of this class based on the
368 // way terrain used to be passed around. 309 // way terrain used to be passed around.
369 public HeightmapTerrainData(double[,] pTerrain) 310 public TerrainData(double[,] pTerrain)
370 { 311 {
371 SizeX = pTerrain.GetLength(0); 312 SizeX = pTerrain.GetLength(0);
372 SizeY = pTerrain.GetLength(1); 313 SizeY = pTerrain.GetLength(1);
373 SizeZ = (int)Constants.RegionHeight; 314 SizeZ = (int)Constants.RegionHeight;
374 m_compressionFactor = 100.0f; 315 CompressionFactor = 100.0f;
375 316
376 m_heightmap = new float[SizeX, SizeY]; 317 m_heightmap = new float[SizeX, SizeY];
377 for (int ii = 0; ii < SizeX; ii++) 318 for (int ii = 0; ii < SizeX; ii++)
@@ -389,12 +330,12 @@ namespace OpenSim.Framework
389 } 330 }
390 331
391 // Create underlying structures but don't initialize the heightmap assuming the caller will immediately do that 332 // Create underlying structures but don't initialize the heightmap assuming the caller will immediately do that
392 public HeightmapTerrainData(int pX, int pY, int pZ) 333 public TerrainData(int pX, int pY, int pZ)
393 { 334 {
394 SizeX = pX; 335 SizeX = pX;
395 SizeY = pY; 336 SizeY = pY;
396 SizeZ = pZ; 337 SizeZ = pZ;
397 m_compressionFactor = 100.0f; 338 CompressionFactor = 100.0f;
398 m_heightmap = new float[SizeX, SizeY]; 339 m_heightmap = new float[SizeX, SizeY];
399 m_taint = new bool[SizeX / Constants.TerrainPatchSize, SizeY / Constants.TerrainPatchSize]; 340 m_taint = new bool[SizeX / Constants.TerrainPatchSize, SizeY / Constants.TerrainPatchSize];
400 // m_log.DebugFormat("{0} new by dimensions. sizeX={1}, sizeY={2}, sizeZ={3}", LogHeader, SizeX, SizeY, SizeZ); 341 // m_log.DebugFormat("{0} new by dimensions. sizeX={1}, sizeY={2}, sizeZ={3}", LogHeader, SizeX, SizeY, SizeZ);
@@ -402,10 +343,10 @@ namespace OpenSim.Framework
402 ClearLand(0f); 343 ClearLand(0f);
403 } 344 }
404 345
405 public HeightmapTerrainData(float[] cmap, float pCompressionFactor, int pX, int pY, int pZ) 346 public TerrainData(float[] cmap, float pCompressionFactor, int pX, int pY, int pZ)
406 : this(pX, pY, pZ) 347 : this(pX, pY, pZ)
407 { 348 {
408 m_compressionFactor = pCompressionFactor; 349 CompressionFactor = pCompressionFactor;
409 int ind = 0; 350 int ind = 0;
410 for (int xx = 0; xx < SizeX; xx++) 351 for (int xx = 0; xx < SizeX; xx++)
411 for (int yy = 0; yy < SizeY; yy++) 352 for (int yy = 0; yy < SizeY; yy++)
@@ -414,7 +355,7 @@ namespace OpenSim.Framework
414 } 355 }
415 356
416 // Create a heighmap from a database blob 357 // Create a heighmap from a database blob
417 public HeightmapTerrainData(int pSizeX, int pSizeY, int pSizeZ, int pFormatCode, byte[] pBlob) 358 public TerrainData(int pSizeX, int pSizeY, int pSizeZ, int pFormatCode, byte[] pBlob)
418 : this(pSizeX, pSizeY, pSizeZ) 359 : this(pSizeX, pSizeY, pSizeZ)
419 { 360 {
420 switch ((DBTerrainRevision)pFormatCode) 361 switch ((DBTerrainRevision)pFormatCode)
@@ -589,7 +530,7 @@ namespace OpenSim.Framework
589 hmSizeY = br.ReadInt32(); 530 hmSizeY = br.ReadInt32();
590 hmCompressionFactor = br.ReadInt32(); 531 hmCompressionFactor = br.ReadInt32();
591 532
592 m_compressionFactor = hmCompressionFactor; 533 CompressionFactor = hmCompressionFactor;
593 534
594 // In case database info doesn't match real terrain size, initialize the whole terrain. 535 // In case database info doesn't match real terrain size, initialize the whole terrain.
595 ClearLand(); 536 ClearLand();
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs
index 417e1cf..131ae50 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -176,7 +176,7 @@ namespace OpenSim.Framework
176 LogOutgoingDetail(string.Format("RESPONSE {0}: ", reqnum), input); 176 LogOutgoingDetail(string.Format("RESPONSE {0}: ", reqnum), input);
177 } 177 }
178 178
179 public static OSDMap ServiceOSDRequest(string url, OSDMap data, string method, int timeout, bool compressed, bool rpc) 179 public static OSDMap ServiceOSDRequest(string url, OSDMap data, string method, int timeout, bool compressed, bool rpc, bool keepalive = false)
180 { 180 {
181 int reqnum = RequestNumber++; 181 int reqnum = RequestNumber++;
182 182
@@ -197,7 +197,7 @@ namespace OpenSim.Framework
197 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); 197 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
198 request.Method = method; 198 request.Method = method;
199 request.Timeout = timeout; 199 request.Timeout = timeout;
200 request.KeepAlive = false; 200 request.KeepAlive = keepalive;
201 request.MaximumAutomaticRedirections = 10; 201 request.MaximumAutomaticRedirections = 10;
202 request.ReadWriteTimeout = timeout / 2; 202 request.ReadWriteTimeout = timeout / 2;
203 request.Headers[OSHeaderRequestID] = reqnum.ToString(); 203 request.Headers[OSHeaderRequestID] = reqnum.ToString();
diff --git a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
index d652f43..db9b8f7 100644
--- a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DAExampleModule.cs
@@ -91,7 +91,7 @@ namespace OpenSim.Region.CoreModules.Framework.DynamicAttributes.DAExampleModule
91 OSDMap attrs = null; 91 OSDMap attrs = null;
92 SceneObjectPart sop = m_scene.GetSceneObjectPart(groupId); 92 SceneObjectPart sop = m_scene.GetSceneObjectPart(groupId);
93 93
94 if (sop == null) 94 if (sop == null || sop.DynAttrs == null)
95 return true; 95 return true;
96 96
97 if (!sop.DynAttrs.TryGetStore(Namespace, StoreName, out attrs)) 97 if (!sop.DynAttrs.TryGetStore(Namespace, StoreName, out attrs))
diff --git a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DOExampleModule.cs b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DOExampleModule.cs
index 3364cbc..8934130 100644
--- a/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DOExampleModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/DynamicAttributes/DOExampleModule.cs
@@ -99,6 +99,8 @@ namespace OpenSim.Region.Framework.DynamicAttributes.DOExampleModule
99 private void OnObjectAddedToScene(SceneObjectGroup so) 99 private void OnObjectAddedToScene(SceneObjectGroup so)
100 { 100 {
101 SceneObjectPart rootPart = so.RootPart; 101 SceneObjectPart rootPart = so.RootPart;
102 if(rootPart.DynAttrs == null)
103 return;
102 104
103 OSDMap attrs; 105 OSDMap attrs;
104 106
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 13b3ffb..abda29a 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -410,8 +410,7 @@ namespace OpenSim.Region.Framework.Scenes
410 m_particleSystem = Utils.EmptyBytes; 410 m_particleSystem = Utils.EmptyBytes;
411 Rezzed = DateTime.UtcNow; 411 Rezzed = DateTime.UtcNow;
412 Description = String.Empty; 412 Description = String.Empty;
413 DynAttrs = new DAMap(); 413
414
415 // Prims currently only contain a single folder (Contents). From looking at the Second Life protocol, 414 // Prims currently only contain a single folder (Contents). From looking at the Second Life protocol,
416 // this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from 415 // this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from
417 // the prim into an agent inventory (Linden client reports that the "Object not found for drop" in its log 416 // the prim into an agent inventory (Linden client reports that the "Object not found for drop" in its log
@@ -3475,7 +3474,29 @@ namespace OpenSim.Region.Framework.Scenes
3475 private const float ANGVELOCITY_TOLERANCE = 0.005f; 3474 private const float ANGVELOCITY_TOLERANCE = 0.005f;
3476 private const float POSITION_TOLERANCE = 0.05f; // I don't like this, but I suppose it's necessary 3475 private const float POSITION_TOLERANCE = 0.05f; // I don't like this, but I suppose it's necessary
3477 private const double TIME_MS_TOLERANCE = 200.0; //llSetPos has a 200ms delay. This should NOT be 3 seconds. 3476 private const double TIME_MS_TOLERANCE = 200.0; //llSetPos has a 200ms delay. This should NOT be 3 seconds.
3478 3477
3478 private Vector3 ClampVectorForTerseUpdate(Vector3 v, float max)
3479 {
3480 float a, b;
3481
3482 a = Math.Abs(v.X);
3483 b = Math.Abs(v.Y);
3484 if (b > a)
3485 a = b;
3486 b = Math.Abs(v.Z);
3487 if (b > a)
3488 a = b;
3489
3490 if (a > max)
3491 {
3492 a = max / a;
3493 v.X *= a;
3494 v.Y *= a;
3495 v.Z *= a;
3496 }
3497 return v;
3498 }
3499
3479 /// <summary> 3500 /// <summary>
3480 /// Tell all the prims which have had updates scheduled 3501 /// Tell all the prims which have had updates scheduled
3481 /// </summary> 3502 /// </summary>
@@ -3491,73 +3512,43 @@ namespace OpenSim.Region.Framework.Scenes
3491 3512
3492 if(current == PrimUpdateFlags.TerseUpdate) 3513 if(current == PrimUpdateFlags.TerseUpdate)
3493 { 3514 {
3494 Vector3 curvel = Velocity;
3495 Vector3 curacc = Acceleration;
3496 Vector3 angvel = AngularVelocity;
3497
3498 while(true) // just to avoid ugly goto 3515 while(true) // just to avoid ugly goto
3499 { 3516 {
3500 double elapsed = now - m_lastUpdateSentTime; 3517 double elapsed = now - m_lastUpdateSentTime;
3501 if (elapsed > TIME_MS_TOLERANCE) 3518 if (elapsed > TIME_MS_TOLERANCE)
3502 break; 3519 break;
3503 3520
3504 if( Math.Abs(curacc.X - m_lastAcceleration.X) > VELOCITY_TOLERANCE || 3521 if ( !Acceleration.ApproxEquals(m_lastAcceleration, VELOCITY_TOLERANCE))
3505 Math.Abs(curacc.Y - m_lastAcceleration.Y) > VELOCITY_TOLERANCE ||
3506 Math.Abs(curacc.Z - m_lastAcceleration.Z) > VELOCITY_TOLERANCE)
3507 break; 3522 break;
3508 3523
3509 if( Math.Abs(curvel.X - m_lastVelocity.X) > VELOCITY_TOLERANCE || 3524 Vector3 curvel = ClampVectorForTerseUpdate(Velocity, 128f);
3510 Math.Abs(curvel.Y - m_lastVelocity.Y) > VELOCITY_TOLERANCE || 3525 Vector3 tmp = ClampVectorForTerseUpdate(m_lastVelocity, 128f);
3511 Math.Abs(curvel.Z - m_lastVelocity.Z) > VELOCITY_TOLERANCE) 3526 if (!curvel.ApproxEquals(tmp, VELOCITY_TOLERANCE))
3512 break; 3527 break;
3513 3528
3514 float vx = Math.Abs(curvel.X); 3529 if (Math.Abs(curvel.X) < 1e-4 && Math.Abs(curvel.Y) < 1e-4 && Math.Abs(curvel.Z) < 1e-4)
3515 if(vx > 128.0)
3516 break;
3517 float vy = Math.Abs(curvel.Y);
3518 if(vy > 128.0)
3519 break;
3520 float vz = Math.Abs(curvel.Z);
3521 if(vz > 128.0)
3522 break;
3523
3524 if(vx < VELOCITY_TOLERANCE && vy < VELOCITY_TOLERANCE && vz < VELOCITY_TOLERANCE
3525 )
3526 { 3530 {
3527 if(!AbsolutePosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE)) 3531 if (!AbsolutePosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE))
3528 break; 3532 break;
3529 if(vx < 1e-4 && vy < 1e-4 && vz < 1e-4 && 3533 if ( Math.Abs(m_lastVelocity.X) > 1e-4 ||
3530 (
3531 Math.Abs(m_lastVelocity.X) > 1e-4 ||
3532 Math.Abs(m_lastVelocity.Y) > 1e-4 || 3534 Math.Abs(m_lastVelocity.Y) > 1e-4 ||
3533 Math.Abs(m_lastVelocity.Z) > 1e-4 3535 Math.Abs(m_lastVelocity.Z) > 1e-4
3534 )) 3536 )
3535 break;
3536 }
3537
3538 if( Math.Abs(angvel.X - m_lastAngularVelocity.X) > ANGVELOCITY_TOLERANCE ||
3539 Math.Abs(angvel.Y - m_lastAngularVelocity.Y) > ANGVELOCITY_TOLERANCE ||
3540 Math.Abs(angvel.Z - m_lastAngularVelocity.Z) > ANGVELOCITY_TOLERANCE)
3541 break; 3537 break;
3538 }
3542 3539
3543 // viewer interpolators have a limit of 64rad/s 3540 Vector3 angvel = ClampVectorForTerseUpdate(AngularVelocity, 64f);
3544 float ax = Math.Abs(angvel.X); 3541 tmp = ClampVectorForTerseUpdate(m_lastAngularVelocity, 64f);
3545 if(ax > 64.0) 3542 if (!angvel.ApproxEquals(tmp, ANGVELOCITY_TOLERANCE))
3546 break;
3547 float ay = Math.Abs(angvel.Y);
3548 if(ay > 64.0)
3549 break;
3550 float az = Math.Abs(angvel.Z);
3551 if(az > 64.0)
3552 break; 3543 break;
3553 3544
3554 if ( 3545 if ( Math.Abs(AngularVelocity.X) < 1e-4 &&
3555 ax < ANGVELOCITY_TOLERANCE && 3546 Math.Abs(AngularVelocity.Y) < 1e-4 &&
3556 ay < ANGVELOCITY_TOLERANCE && 3547 Math.Abs(AngularVelocity.Z) < 1e-4 &&
3557 az < ANGVELOCITY_TOLERANCE &&
3558 !RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) 3548 !RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE)
3559 ) 3549 )
3560 break; 3550 break;
3551
3561 return; 3552 return;
3562 } 3553 }
3563 } 3554 }
diff --git a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
index 92fd314..96d2dc4 100644
--- a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
+++ b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
@@ -61,7 +61,7 @@ namespace OpenSim.Region.Framework.Scenes
61 // Default, not-often-used builder 61 // Default, not-often-used builder
62 public TerrainChannel() 62 public TerrainChannel()
63 { 63 {
64 m_terrainData = new HeightmapTerrainData((int)Constants.RegionSize, (int)Constants.RegionSize, (int)Constants.RegionHeight); 64 m_terrainData = new TerrainData((int)Constants.RegionSize, (int)Constants.RegionSize, (int)Constants.RegionHeight);
65 FlatLand(); 65 FlatLand();
66 // PinHeadIsland(); 66 // PinHeadIsland();
67 } 67 }
@@ -69,14 +69,14 @@ namespace OpenSim.Region.Framework.Scenes
69 // Create terrain of given size 69 // Create terrain of given size
70 public TerrainChannel(int pX, int pY) 70 public TerrainChannel(int pX, int pY)
71 { 71 {
72 m_terrainData = new HeightmapTerrainData(pX, pY, (int)Constants.RegionHeight); 72 m_terrainData = new TerrainData(pX, pY, (int)Constants.RegionHeight);
73 } 73 }
74 74
75 // Create terrain of specified size and initialize with specified terrain. 75 // Create terrain of specified size and initialize with specified terrain.
76 // TODO: join this with the terrain initializers. 76 // TODO: join this with the terrain initializers.
77 public TerrainChannel(String type, int pX, int pY, int pZ) 77 public TerrainChannel(String type, int pX, int pY, int pZ)
78 { 78 {
79 m_terrainData = new HeightmapTerrainData(pX, pY, pZ); 79 m_terrainData = new TerrainData(pX, pY, pZ);
80 if (type.Equals("flat")) 80 if (type.Equals("flat"))
81 FlatLand(); 81 FlatLand();
82 else 82 else
@@ -90,7 +90,7 @@ namespace OpenSim.Region.Framework.Scenes
90 int hmSizeX = pM.GetLength(0); 90 int hmSizeX = pM.GetLength(0);
91 int hmSizeY = pM.GetLength(1); 91 int hmSizeY = pM.GetLength(1);
92 92
93 m_terrainData = new HeightmapTerrainData(pSizeX, pSizeY, pAltitude); 93 m_terrainData = new TerrainData(pSizeX, pSizeY, pAltitude);
94 94
95 for (int xx = 0; xx < pSizeX; xx++) 95 for (int xx = 0; xx < pSizeX; xx++)
96 for (int yy = 0; yy < pSizeY; yy++) 96 for (int yy = 0; yy < pSizeY; yy++)
@@ -309,7 +309,7 @@ namespace OpenSim.Region.Framework.Scenes
309 int tmpY = baseY + baseY / 2; 309 int tmpY = baseY + baseY / 2;
310 int centreX = tmpX / 2; 310 int centreX = tmpX / 2;
311 int centreY = tmpY / 2; 311 int centreY = tmpY / 2;
312 TerrainData terrain_tmp = new HeightmapTerrainData(tmpX, tmpY, (int)Constants.RegionHeight); 312 TerrainData terrain_tmp = new TerrainData(tmpX, tmpY, (int)Constants.RegionHeight);
313 for (int xx = 0; xx < tmpX; xx++) 313 for (int xx = 0; xx < tmpX; xx++)
314 for (int yy = 0; yy < tmpY; yy++) 314 for (int yy = 0; yy < tmpY; yy++)
315 terrain_tmp[xx, yy] = -65535f; //use this height like an 'alpha' mask channel 315 terrain_tmp[xx, yy] = -65535f; //use this height like an 'alpha' mask channel
@@ -483,7 +483,7 @@ namespace OpenSim.Region.Framework.Scenes
483 byte[] dataArray = (byte[])serializer.Deserialize(xmlReader); 483 byte[] dataArray = (byte[])serializer.Deserialize(xmlReader);
484 int index = 0; 484 int index = 0;
485 485
486 m_terrainData = new HeightmapTerrainData(Height, Width, (int)Constants.RegionHeight); 486 m_terrainData = new TerrainData(Height, Width, (int)Constants.RegionHeight);
487 487
488 for (int y = 0; y < Height; y++) 488 for (int y = 0; y < Height; y++)
489 { 489 {
@@ -530,7 +530,7 @@ namespace OpenSim.Region.Framework.Scenes
530 { 530 {
531 XmlSerializer serializer = new XmlSerializer(typeof(TerrainChannelXMLPackage)); 531 XmlSerializer serializer = new XmlSerializer(typeof(TerrainChannelXMLPackage));
532 TerrainChannelXMLPackage package = (TerrainChannelXMLPackage)serializer.Deserialize(xmlReader); 532 TerrainChannelXMLPackage package = (TerrainChannelXMLPackage)serializer.Deserialize(xmlReader);
533 m_terrainData = new HeightmapTerrainData(package.Map, package.CompressionFactor, package.SizeX, package.SizeY, package.SizeZ); 533 m_terrainData = new TerrainData(package.Map, package.CompressionFactor, package.SizeX, package.SizeY, package.SizeZ);
534 } 534 }
535 535
536 // Fill the heightmap with the center bump terrain 536 // Fill the heightmap with the center bump terrain
diff --git a/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs b/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs
index 2070463..fa17102 100644
--- a/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs
+++ b/OpenSim/Region/Framework/Scenes/TerrainCompressor.cs
@@ -155,7 +155,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
155 return iout; 155 return iout;
156 } 156 }
157 157
158 static double tt;
159 // new using terrain data and patchs indexes 158 // new using terrain data and patchs indexes
160 public static List<LayerDataPacket> CreateLayerDataPackets(TerrainData terrData, int[] map) 159 public static List<LayerDataPacket> CreateLayerDataPackets(TerrainData terrData, int[] map)
161 { 160 {
@@ -180,15 +179,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
180 bitpack.PackBitsFromByte(16); 179 bitpack.PackBitsFromByte(16);
181 bitpack.PackBitsFromByte(landPacketType); 180 bitpack.PackBitsFromByte(landPacketType);
182 181
183 tt = 0;
184
185 int s; 182 int s;
186 for (int i = 0; i < numberPatchs; i++) 183 for (int i = 0; i < numberPatchs; i++)
187 { 184 {
188 s = 2 * i; 185 s = 2 * i;
189 tt -= Util.GetTimeStampMS();
190 CreatePatchFromTerrainData(bitpack, terrData, map[s], map[s + 1]); 186 CreatePatchFromTerrainData(bitpack, terrData, map[s], map[s + 1]);
191 tt += Util.GetTimeStampMS();
192 187
193 if (bitpack.BytePos > 980 && i != numberPatchs - 1) 188 if (bitpack.BytePos > 980 && i != numberPatchs - 1)
194 { 189 {
diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs
index 9343aab..4546494 100644
--- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs
@@ -736,7 +736,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore
736 get 736 get
737 { 737 {
738 SceneObjectPart sop = m_scene.GetSceneObjectPart(m_objectID); 738 SceneObjectPart sop = m_scene.GetSceneObjectPart(m_objectID);
739 if (sop == null) 739 if (sop == null || sop.DynAttrs == null)
740 { 740 {
741 // This is bad 741 // This is bad
742 return null; 742 return null;
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs
index cea738c..62e4485 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
55 Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face); 55 Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face);
56 texface.RGBA = new Color4(value.R,value.G,value.B,value.A); 56 texface.RGBA = new Color4(value.R,value.G,value.B,value.A);
57 tex.FaceTextures[m_face] = texface; 57 tex.FaceTextures[m_face] = texface;
58 m_parent.UpdateTextureEntry(tex.GetBytes()); 58 m_parent.UpdateTextureEntry(tex);
59 } 59 }
60 } 60 }
61 61
@@ -72,7 +72,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
72 Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face); 72 Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face);
73 texface.TextureID = value; 73 texface.TextureID = value;
74 tex.FaceTextures[m_face] = texface; 74 tex.FaceTextures[m_face] = texface;
75 m_parent.UpdateTextureEntry(tex.GetBytes()); 75 m_parent.UpdateTextureEntry(tex);
76 } 76 }
77 } 77 }
78 78
@@ -97,7 +97,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
97 Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face); 97 Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face);
98 texface.Fullbright = value; 98 texface.Fullbright = value;
99 tex.FaceTextures[m_face] = texface; 99 tex.FaceTextures[m_face] = texface;
100 m_parent.UpdateTextureEntry(tex.GetBytes()); 100 m_parent.UpdateTextureEntry(tex);
101 } 101 }
102 } 102 }
103 103
@@ -110,7 +110,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
110 Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face); 110 Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face);
111 texface.Glow = (float) value; 111 texface.Glow = (float) value;
112 tex.FaceTextures[m_face] = texface; 112 tex.FaceTextures[m_face] = texface;
113 m_parent.UpdateTextureEntry(tex.GetBytes()); 113 m_parent.UpdateTextureEntry(tex);
114 } 114 }
115 } 115 }
116 116
@@ -123,7 +123,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
123 Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face); 123 Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face);
124 texface.Shiny = value ? Shininess.High : Shininess.None; 124 texface.Shiny = value ? Shininess.High : Shininess.None;
125 tex.FaceTextures[m_face] = texface; 125 tex.FaceTextures[m_face] = texface;
126 m_parent.UpdateTextureEntry(tex.GetBytes()); 126 m_parent.UpdateTextureEntry(tex);
127 } 127 }
128 } 128 }
129 129
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
index 6504fdc..4fd1fe5 100644
--- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -323,7 +323,7 @@ namespace OpenSim.Services.Connectors.Simulation
323 323
324 try 324 try
325 { 325 {
326 OSDMap result = WebUtil.ServiceOSDRequest(uri, request, "QUERYACCESS", 30000, false, false); 326 OSDMap result = WebUtil.ServiceOSDRequest(uri, request, "QUERYACCESS", 30000, false, false, true);
327 bool success = result["success"].AsBoolean(); 327 bool success = result["success"].AsBoolean();
328 if (result.ContainsKey("_Result")) 328 if (result.ContainsKey("_Result"))
329 { 329 {