aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMW2007-08-03 11:44:30 +0000
committerMW2007-08-03 11:44:30 +0000
commitdde8aafb8addbb7ae00802c31f27d51456170000 (patch)
tree6790b2130113e3c2c10c100dac8f33bcd294ac5e /OpenSim
parent*Estate settings are now saved in their own configuration file called estate_... (diff)
downloadopensim-SC_OLD-dde8aafb8addbb7ae00802c31f27d51456170000.zip
opensim-SC_OLD-dde8aafb8addbb7ae00802c31f27d51456170000.tar.gz
opensim-SC_OLD-dde8aafb8addbb7ae00802c31f27d51456170000.tar.bz2
opensim-SC_OLD-dde8aafb8addbb7ae00802c31f27d51456170000.tar.xz
More work on the AllNewSceneObject* classes.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/General/Types/EstateSettings.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/AllNewSceneObjectGroup2.cs85
-rw-r--r--OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs40
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs2
4 files changed, 125 insertions, 4 deletions
diff --git a/OpenSim/Framework/General/Types/EstateSettings.cs b/OpenSim/Framework/General/Types/EstateSettings.cs
index ac173a9..11594fd 100644
--- a/OpenSim/Framework/General/Types/EstateSettings.cs
+++ b/OpenSim/Framework/General/Types/EstateSettings.cs
@@ -560,7 +560,6 @@ namespace OpenSim.Framework.Types
560 560
561 public void loadConfigurationOptions() 561 public void loadConfigurationOptions()
562 { 562 {
563
564 configMember.addConfigurationOption("billable_factor", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "","0.0",true); 563 configMember.addConfigurationOption("billable_factor", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "","0.0",true);
565 configMember.addConfigurationOption("estate_id", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "","0",true); 564 configMember.addConfigurationOption("estate_id", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "","0",true);
566 configMember.addConfigurationOption("parent_estate_id", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "", "0", true); 565 configMember.addConfigurationOption("parent_estate_id", ConfigurationOption.ConfigurationTypes.TYPE_UINT32, "", "0", true);
@@ -603,7 +602,6 @@ namespace OpenSim.Framework.Types
603 configMember.addConfigurationOption("terrain_multiplier", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "60.0", true); 602 configMember.addConfigurationOption("terrain_multiplier", ConfigurationOption.ConfigurationTypes.TYPE_FLOAT, "", "60.0", true);
604 configMember.addConfigurationOption("water_height", ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE, "", "20.0", true); 603 configMember.addConfigurationOption("water_height", ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE, "", "20.0", true);
605 configMember.addConfigurationOption("terrain_image_id", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", "00000000-0000-0000-0000-000000000000", true); 604 configMember.addConfigurationOption("terrain_image_id", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, "", "00000000-0000-0000-0000-000000000000", true);
606
607 } 605 }
608 606
609 public bool handleIncomingConfiguration(string configuration_key, object configuration_result) 607 public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
diff --git a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectGroup2.cs b/OpenSim/Region/Environment/Scenes/AllNewSceneObjectGroup2.cs
index e43329d..8fd8e52 100644
--- a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectGroup2.cs
+++ b/OpenSim/Region/Environment/Scenes/AllNewSceneObjectGroup2.cs
@@ -18,6 +18,9 @@ namespace OpenSim.Region.Environment.Scenes
18 protected AllNewSceneObjectPart2 m_rootPart; 18 protected AllNewSceneObjectPart2 m_rootPart;
19 protected Dictionary<LLUUID, AllNewSceneObjectPart2> m_parts = new Dictionary<LLUUID, AllNewSceneObjectPart2>(); 19 protected Dictionary<LLUUID, AllNewSceneObjectPart2> m_parts = new Dictionary<LLUUID, AllNewSceneObjectPart2>();
20 20
21 protected ulong m_regionHandle;
22 protected Scene m_scene;
23
21 public event PrimCountTaintedDelegate OnPrimCountTainted; 24 public event PrimCountTaintedDelegate OnPrimCountTainted;
22 25
23 /// <summary> 26 /// <summary>
@@ -45,9 +48,14 @@ namespace OpenSim.Region.Environment.Scenes
45 /// <summary> 48 /// <summary>
46 /// 49 ///
47 /// </summary> 50 /// </summary>
48 public AllNewSceneObjectGroup2() 51 public AllNewSceneObjectGroup2(Scene world, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape)
49 { 52 {
53 m_regionHandle = regionHandle;
54 m_scene = world;
50 55
56 this.Pos = pos;
57 this.m_rootPart = new AllNewSceneObjectPart2(m_regionHandle, this, ownerID, localID, shape, pos);
58 this.m_parts.Add(this.m_rootPart.UUID, this.m_rootPart);
51 } 59 }
52 60
53 /// <summary> 61 /// <summary>
@@ -142,6 +150,9 @@ namespace OpenSim.Region.Environment.Scenes
142 return false; 150 return false;
143 } 151 }
144 152
153 /// <summary>
154 ///
155 /// </summary>
145 public void TriggerTainted() 156 public void TriggerTainted()
146 { 157 {
147 if (OnPrimCountTainted != null) 158 if (OnPrimCountTainted != null)
@@ -194,6 +205,50 @@ namespace OpenSim.Region.Environment.Scenes
194 client.OutPacket(proper); 205 client.OutPacket(proper);
195 } 206 }
196 207
208 /// <summary>
209 ///
210 /// </summary>
211 /// <param name="remoteClient"></param>
212 /// <param name="localID"></param>
213 public void GetInventory(IClientAPI remoteClient, uint localID)
214 {
215 AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
216 if (part != null)
217 {
218 part.GetInventory(remoteClient, localID);
219 }
220 }
221
222 /// <summary>
223 ///
224 /// </summary>
225 /// <param name="localID"></param>
226 /// <param name="type"></param>
227 /// <param name="inUse"></param>
228 /// <param name="data"></param>
229 public void UpdateExtraParam(uint localID, ushort type, bool inUse, byte[] data)
230 {
231 AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
232 if (part != null)
233 {
234 part.UpdateExtraParam(type, inUse, data);
235 }
236 }
237
238 /// <summary>
239 ///
240 /// </summary>
241 /// <param name="localID"></param>
242 /// <param name="textureEntry"></param>
243 public void UpdateTextureEntry(uint localID, byte[] textureEntry)
244 {
245 AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
246 if (part != null)
247 {
248 part.UpdateTextureEntry(textureEntry);
249 }
250 }
251
197 #region Shape 252 #region Shape
198 /// <summary> 253 /// <summary>
199 /// 254 ///
@@ -210,11 +265,20 @@ namespace OpenSim.Region.Environment.Scenes
210 #endregion 265 #endregion
211 266
212 #region Position 267 #region Position
268 /// <summary>
269 ///
270 /// </summary>
271 /// <param name="pos"></param>
213 public void UpdateGroupPosition(LLVector3 pos) 272 public void UpdateGroupPosition(LLVector3 pos)
214 { 273 {
215 this.m_pos = pos; 274 this.m_pos = pos;
216 } 275 }
217 276
277 /// <summary>
278 ///
279 /// </summary>
280 /// <param name="pos"></param>
281 /// <param name="localID"></param>
218 public void UpdateSinglePosition(LLVector3 pos, uint localID) 282 public void UpdateSinglePosition(LLVector3 pos, uint localID)
219 { 283 {
220 AllNewSceneObjectPart2 part = this.GetChildPrim(localID); 284 AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
@@ -231,6 +295,10 @@ namespace OpenSim.Region.Environment.Scenes
231 } 295 }
232 } 296 }
233 297
298 /// <summary>
299 ///
300 /// </summary>
301 /// <param name="pos"></param>
234 private void UpdateRootPosition(LLVector3 pos) 302 private void UpdateRootPosition(LLVector3 pos)
235 { 303 {
236 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); 304 LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
@@ -258,6 +326,10 @@ namespace OpenSim.Region.Environment.Scenes
258 #endregion 326 #endregion
259 327
260 #region Roation 328 #region Roation
329 /// <summary>
330 ///
331 /// </summary>
332 /// <param name="rot"></param>
261 public void UpdateGroupRotation(LLQuaternion rot) 333 public void UpdateGroupRotation(LLQuaternion rot)
262 { 334 {
263 this.m_rootPart.UpdateRotation(rot); 335 this.m_rootPart.UpdateRotation(rot);
@@ -274,6 +346,11 @@ namespace OpenSim.Region.Environment.Scenes
274 this.m_pos = pos; 346 this.m_pos = pos;
275 } 347 }
276 348
349 /// <summary>
350 ///
351 /// </summary>
352 /// <param name="rot"></param>
353 /// <param name="localID"></param>
277 public void UpdateSingleRotation(LLQuaternion rot, uint localID) 354 public void UpdateSingleRotation(LLQuaternion rot, uint localID)
278 { 355 {
279 AllNewSceneObjectPart2 part = this.GetChildPrim(localID); 356 AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
@@ -289,6 +366,11 @@ namespace OpenSim.Region.Environment.Scenes
289 } 366 }
290 } 367 }
291 } 368 }
369
370 /// <summary>
371 ///
372 /// </summary>
373 /// <param name="rot"></param>
292 private void UpdateRootRotation(LLQuaternion rot) 374 private void UpdateRootRotation(LLQuaternion rot)
293 { 375 {
294 this.m_rootPart.UpdateRotation(rot); 376 this.m_rootPart.UpdateRotation(rot);
@@ -310,6 +392,7 @@ namespace OpenSim.Region.Environment.Scenes
310 } 392 }
311 } 393 }
312 } 394 }
395
313 #endregion 396 #endregion
314 /// <summary> 397 /// <summary>
315 /// 398 ///
diff --git a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs b/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs
index c4b4b43..62f9b93 100644
--- a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs
+++ b/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs
@@ -252,6 +252,15 @@ namespace OpenSim.Region.Environment.Scenes
252 #endregion 252 #endregion
253 253
254 #region Constructors 254 #region Constructors
255 /// <summary>
256 /// Create a completely new SceneObjectPart (prim)
257 /// </summary>
258 /// <param name="regionHandle"></param>
259 /// <param name="parent"></param>
260 /// <param name="ownerID"></param>
261 /// <param name="localID"></param>
262 /// <param name="shape"></param>
263 /// <param name="position"></param>
255 public AllNewSceneObjectPart2(ulong regionHandle, AllNewSceneObjectGroup2 parent, LLUUID ownerID, uint localID, PrimitiveBaseShape shape, LLVector3 position) 264 public AllNewSceneObjectPart2(ulong regionHandle, AllNewSceneObjectGroup2 parent, LLUUID ownerID, uint localID, PrimitiveBaseShape shape, LLVector3 position)
256 { 265 {
257 this.m_regionHandle = regionHandle; 266 this.m_regionHandle = regionHandle;
@@ -266,6 +275,10 @@ namespace OpenSim.Region.Environment.Scenes
266 this.m_Shape = shape; 275 this.m_Shape = shape;
267 276
268 this.OffsetPosition = position; 277 this.OffsetPosition = position;
278 this.RotationOffset = LLQuaternion.Identity;
279 this.Velocity = new LLVector3(0, 0, 0);
280 this.AngularVelocity = new LLVector3(0, 0, 0);
281 this.Acceleration = new LLVector3(0, 0, 0);
269 282
270 //temporary code just so the m_flags field doesn't give a compiler warning 283 //temporary code just so the m_flags field doesn't give a compiler warning
271 if (m_flags ==LLObject.ObjectFlags.AllowInventoryDrop) 284 if (m_flags ==LLObject.ObjectFlags.AllowInventoryDrop)
@@ -273,6 +286,33 @@ namespace OpenSim.Region.Environment.Scenes
273 286
274 } 287 }
275 } 288 }
289
290 /// <summary>
291 /// Recreate a SceneObjectPart (prim)
292 /// </summary>
293 /// <param name="regionHandle"></param>
294 /// <param name="parent"></param>
295 /// <param name="ownerID"></param>
296 /// <param name="localID"></param>
297 /// <param name="shape"></param>
298 /// <param name="position"></param>
299 public AllNewSceneObjectPart2(ulong regionHandle, AllNewSceneObjectGroup2 parent, int creationDate, LLUUID ownerID, LLUUID creatorID, LLUUID lastOwnerID, uint localID, PrimitiveBaseShape shape, LLVector3 position, LLQuaternion rotation, uint flags)
300 {
301 this.m_regionHandle = regionHandle;
302 this.m_parentGroup = parent;
303
304 this.CreationDate = creationDate;
305 this.OwnerID = ownerID;
306 this.CreatorID = creatorID;
307 this.LastOwnerID = lastOwnerID;
308 this.UUID = LLUUID.Random();
309 this.LocalID = (uint)(localID);
310 this.m_Shape = shape;
311
312 this.OffsetPosition = position;
313 this.RotationOffset = rotation;
314 this.ObjectFlags = flags;
315 }
276 #endregion 316 #endregion
277 317
278 #region Update Scheduling 318 #region Update Scheduling
diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
index 27259b9..1e0e978 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs
@@ -794,7 +794,7 @@ namespace OpenSim.Region.Terrain
794 s.Close(); 794 s.Close();
795 } 795 }
796 796
797 /// <summary> 797 /// <summary>
798 /// Outputs to a LL compatible RAW in the most efficient manner possible 798 /// Outputs to a LL compatible RAW in the most efficient manner possible
799 /// </summary> 799 /// </summary>
800 /// <remarks>Does not calculate the revert map</remarks> 800 /// <remarks>Does not calculate the revert map</remarks>