diff options
Diffstat (limited to '')
18 files changed, 300 insertions, 232 deletions
diff --git a/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs b/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs index 4148d08..395819d 100644 --- a/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs +++ b/OpenSim/Region/Environment/Interfaces/IRegionDataStore.cs | |||
@@ -47,10 +47,10 @@ namespace OpenSim.Region.Interfaces | |||
47 | /// <param name="dbname">The name of the database to store to (may not be applicable)</param> | 47 | /// <param name="dbname">The name of the database to store to (may not be applicable)</param> |
48 | void Initialise(string filename, string dbname); | 48 | void Initialise(string filename, string dbname); |
49 | 49 | ||
50 | void StoreObject(SceneObject obj); | 50 | void StoreObject(SceneObjectGroup obj); |
51 | void RemoveObject(LLUUID uuid); | 51 | void RemoveObject(LLUUID uuid); |
52 | 52 | ||
53 | List<SceneObject> LoadObjects(); | 53 | List<SceneObjectGroup> LoadObjects(); |
54 | 54 | ||
55 | void StoreTerrain(double[,] terrain); | 55 | void StoreTerrain(double[,] terrain); |
56 | double[,] LoadTerrain(); | 56 | double[,] LoadTerrain(); |
diff --git a/OpenSim/Region/Environment/LandManagement/Land.cs b/OpenSim/Region/Environment/LandManagement/Land.cs index 97f8276..e9f5248 100644 --- a/OpenSim/Region/Environment/LandManagement/Land.cs +++ b/OpenSim/Region/Environment/LandManagement/Land.cs | |||
@@ -16,7 +16,7 @@ namespace OpenSim.Region.Environment.LandManagement | |||
16 | { | 16 | { |
17 | #region Member Variables | 17 | #region Member Variables |
18 | public LandData landData = new LandData(); | 18 | public LandData landData = new LandData(); |
19 | public List<SceneObject> primsOverMe = new List<SceneObject>(); | 19 | public List<SceneObjectGroup> primsOverMe = new List<SceneObjectGroup>(); |
20 | 20 | ||
21 | public Scene m_scene; | 21 | public Scene m_scene; |
22 | 22 | ||
@@ -426,21 +426,21 @@ namespace OpenSim.Region.Environment.LandManagement | |||
426 | public void sendForceObjectSelect(int local_id, int request_type, IClientAPI remote_client) | 426 | public void sendForceObjectSelect(int local_id, int request_type, IClientAPI remote_client) |
427 | { | 427 | { |
428 | List<uint> resultLocalIDs = new List<uint>(); | 428 | List<uint> resultLocalIDs = new List<uint>(); |
429 | foreach (SceneObject obj in primsOverMe) | 429 | foreach (SceneObjectGroup obj in primsOverMe) |
430 | { | 430 | { |
431 | if (obj.rootLocalID > 0) | 431 | if (obj.LocalId > 0) |
432 | { | 432 | { |
433 | if (request_type == LandManager.LAND_SELECT_OBJECTS_OWNER && obj.rootPrimitive.OwnerID == this.landData.ownerID) | 433 | if (request_type == LandManager.LAND_SELECT_OBJECTS_OWNER && obj.OwnerID == this.landData.ownerID) |
434 | { | 434 | { |
435 | resultLocalIDs.Add(obj.rootLocalID); | 435 | resultLocalIDs.Add(obj.LocalId); |
436 | } | 436 | } |
437 | else if (request_type == LandManager.LAND_SELECT_OBJECTS_GROUP && false) //TODO: change false to group support! | 437 | else if (request_type == LandManager.LAND_SELECT_OBJECTS_GROUP && false) //TODO: change false to group support! |
438 | { | 438 | { |
439 | 439 | ||
440 | } | 440 | } |
441 | else if (request_type == LandManager.LAND_SELECT_OBJECTS_OTHER && obj.rootPrimitive.OwnerID != remote_client.AgentId) | 441 | else if (request_type == LandManager.LAND_SELECT_OBJECTS_OTHER && obj.OwnerID != remote_client.AgentId) |
442 | { | 442 | { |
443 | resultLocalIDs.Add(obj.rootLocalID); | 443 | resultLocalIDs.Add(obj.LocalId); |
444 | } | 444 | } |
445 | } | 445 | } |
446 | } | 446 | } |
@@ -486,13 +486,13 @@ namespace OpenSim.Region.Environment.LandManagement | |||
486 | public void sendLandObjectOwners(IClientAPI remote_client) | 486 | public void sendLandObjectOwners(IClientAPI remote_client) |
487 | { | 487 | { |
488 | Dictionary<LLUUID, int> ownersAndCount = new Dictionary<LLUUID, int>(); | 488 | Dictionary<LLUUID, int> ownersAndCount = new Dictionary<LLUUID, int>(); |
489 | foreach (SceneObject obj in primsOverMe) | 489 | foreach (SceneObjectGroup obj in primsOverMe) |
490 | { | 490 | { |
491 | if (!ownersAndCount.ContainsKey(obj.rootPrimitive.OwnerID)) | 491 | if (!ownersAndCount.ContainsKey(obj.OwnerID)) |
492 | { | 492 | { |
493 | ownersAndCount.Add(obj.rootPrimitive.OwnerID, 0); | 493 | ownersAndCount.Add(obj.OwnerID, 0); |
494 | } | 494 | } |
495 | ownersAndCount[obj.rootPrimitive.OwnerID] += obj.primCount; | 495 | ownersAndCount[obj.OwnerID] += obj.PrimCount; |
496 | } | 496 | } |
497 | if (ownersAndCount.Count > 0) | 497 | if (ownersAndCount.Count > 0) |
498 | { | 498 | { |
@@ -525,7 +525,7 @@ namespace OpenSim.Region.Environment.LandManagement | |||
525 | #endregion | 525 | #endregion |
526 | 526 | ||
527 | #region Object Returning | 527 | #region Object Returning |
528 | public void returnObject(SceneObject obj) | 528 | public void returnObject(SceneObjectGroup obj) |
529 | { | 529 | { |
530 | } | 530 | } |
531 | public void returnLandObjects(int type, LLUUID owner) | 531 | public void returnLandObjects(int type, LLUUID owner) |
@@ -544,12 +544,12 @@ namespace OpenSim.Region.Environment.LandManagement | |||
544 | primsOverMe.Clear(); | 544 | primsOverMe.Clear(); |
545 | } | 545 | } |
546 | 546 | ||
547 | public void addPrimToCount(SceneObject obj) | 547 | public void addPrimToCount(SceneObjectGroup obj) |
548 | { | 548 | { |
549 | LLUUID prim_owner = obj.rootPrimitive.OwnerID; | 549 | LLUUID prim_owner = obj.OwnerID; |
550 | int prim_count = obj.primCount; | 550 | int prim_count = obj.PrimCount; |
551 | 551 | ||
552 | if (obj.isSelected) | 552 | if (obj.IsSelected) |
553 | { | 553 | { |
554 | landData.selectedPrims += prim_count; | 554 | landData.selectedPrims += prim_count; |
555 | } | 555 | } |
@@ -569,12 +569,12 @@ namespace OpenSim.Region.Environment.LandManagement | |||
569 | 569 | ||
570 | } | 570 | } |
571 | 571 | ||
572 | public void removePrimFromCount(SceneObject obj) | 572 | public void removePrimFromCount(SceneObjectGroup obj) |
573 | { | 573 | { |
574 | if (primsOverMe.Contains(obj)) | 574 | if (primsOverMe.Contains(obj)) |
575 | { | 575 | { |
576 | LLUUID prim_owner = obj.rootPrimitive.OwnerID; | 576 | LLUUID prim_owner = obj.OwnerID; |
577 | int prim_count = obj.primCount; | 577 | int prim_count = obj.PrimCount; |
578 | 578 | ||
579 | if (prim_owner == landData.ownerID) | 579 | if (prim_owner == landData.ownerID) |
580 | { | 580 | { |
diff --git a/OpenSim/Region/Environment/LandManagement/LandManager.cs b/OpenSim/Region/Environment/LandManagement/LandManager.cs index f759934..f67b51a 100644 --- a/OpenSim/Region/Environment/LandManagement/LandManager.cs +++ b/OpenSim/Region/Environment/LandManagement/LandManager.cs | |||
@@ -552,7 +552,7 @@ namespace OpenSim.Region.Environment.LandManagement | |||
552 | this.landPrimCountTainted = true; | 552 | this.landPrimCountTainted = true; |
553 | } | 553 | } |
554 | 554 | ||
555 | public void addPrimToLandPrimCounts(SceneObject obj) | 555 | public void addPrimToLandPrimCounts(SceneObjectGroup obj) |
556 | { | 556 | { |
557 | LLVector3 position = obj.Pos; | 557 | LLVector3 position = obj.Pos; |
558 | Land landUnderPrim = getLandObject(position.X, position.Y); | 558 | Land landUnderPrim = getLandObject(position.X, position.Y); |
@@ -562,7 +562,7 @@ namespace OpenSim.Region.Environment.LandManagement | |||
562 | } | 562 | } |
563 | } | 563 | } |
564 | 564 | ||
565 | public void removePrimFromLandPrimCounts(SceneObject obj) | 565 | public void removePrimFromLandPrimCounts(SceneObjectGroup obj) |
566 | { | 566 | { |
567 | foreach (Land p in landList.Values) | 567 | foreach (Land p in landList.Values) |
568 | { | 568 | { |
diff --git a/OpenSim/Region/Environment/PermissionManager.cs b/OpenSim/Region/Environment/PermissionManager.cs index 150a8ed..0758566 100644 --- a/OpenSim/Region/Environment/PermissionManager.cs +++ b/OpenSim/Region/Environment/PermissionManager.cs | |||
@@ -53,11 +53,11 @@ namespace OpenSim.Region.Environment | |||
53 | bool permission = false; | 53 | bool permission = false; |
54 | 54 | ||
55 | // If it's not an object, we cant edit it. | 55 | // If it's not an object, we cant edit it. |
56 | if (!(m_scene.Entities[obj] is SceneObject)) | 56 | if (!(m_scene.Entities[obj] is SceneObjectGroup)) |
57 | return false; | 57 | return false; |
58 | 58 | ||
59 | SceneObject task = (SceneObject)m_scene.Entities[obj]; | 59 | SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[obj]; |
60 | LLUUID taskOwner = task.rootPrimitive.OwnerID; | 60 | LLUUID taskOwner = null; |
61 | 61 | ||
62 | // Object owners should be able to edit their own content | 62 | // Object owners should be able to edit their own content |
63 | if (user == taskOwner) | 63 | if (user == taskOwner) |
diff --git a/OpenSim/Region/Environment/Scenes/Primitive.cs b/OpenSim/Region/Environment/Scenes/Primitive(Old).cs index 132eabb..64976a8 100644 --- a/OpenSim/Region/Environment/Scenes/Primitive.cs +++ b/OpenSim/Region/Environment/Scenes/Primitive(Old).cs | |||
@@ -45,7 +45,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
45 | private PrimitiveBaseShape m_shape; | 45 | private PrimitiveBaseShape m_shape; |
46 | private byte[] m_particleSystem = new byte[0]; | 46 | private byte[] m_particleSystem = new byte[0]; |
47 | 47 | ||
48 | public SceneObject m_RootParent; | 48 | public SceneObjectOLD m_RootParent; |
49 | public bool m_isRootPrim; | 49 | public bool m_isRootPrim; |
50 | public EntityBase m_Parent; | 50 | public EntityBase m_Parent; |
51 | 51 | ||
@@ -144,7 +144,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
144 | #region Constructors | 144 | #region Constructors |
145 | 145 | ||
146 | public Primitive(ulong regionHandle, Scene scene, LLUUID ownerID, uint localID, bool isRoot, EntityBase parent, | 146 | public Primitive(ulong regionHandle, Scene scene, LLUUID ownerID, uint localID, bool isRoot, EntityBase parent, |
147 | SceneObject rootObject, PrimitiveBaseShape shape, LLVector3 pos) | 147 | SceneObjectOLD rootObject, PrimitiveBaseShape shape, LLVector3 pos) |
148 | { | 148 | { |
149 | m_regionHandle = regionHandle; | 149 | m_regionHandle = regionHandle; |
150 | m_scene = scene; | 150 | m_scene = scene; |
@@ -184,7 +184,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
184 | 184 | ||
185 | #region Duplication | 185 | #region Duplication |
186 | 186 | ||
187 | public Primitive Copy(EntityBase parent, SceneObject rootParent) | 187 | public Primitive Copy(EntityBase parent, SceneObjectOLD rootParent) |
188 | { | 188 | { |
189 | Primitive dupe = (Primitive)MemberwiseClone(); | 189 | Primitive dupe = (Primitive)MemberwiseClone(); |
190 | 190 | ||
@@ -204,7 +204,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
204 | dupe.m_uuid = LLUUID.Random(); | 204 | dupe.m_uuid = LLUUID.Random(); |
205 | dupe.LocalId = newLocalID; | 205 | dupe.LocalId = newLocalID; |
206 | 206 | ||
207 | if (parent is SceneObject) | 207 | if (parent is SceneObjectGroup) |
208 | { | 208 | { |
209 | dupe.m_isRootPrim = true; | 209 | dupe.m_isRootPrim = true; |
210 | dupe.ParentID = 0; | 210 | dupe.ParentID = 0; |
@@ -314,13 +314,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
314 | /// | 314 | /// |
315 | /// </summary> | 315 | /// </summary> |
316 | /// <param name="linkObject"></param> | 316 | /// <param name="linkObject"></param> |
317 | public void AddNewChildren(SceneObject linkObject) | 317 | public void AddNewChildren(SceneObjectOLD linkObject) |
318 | { | 318 | { |
319 | // Console.WriteLine("linking new prims " + linkObject.rootLocalID + " to me (" + this.LocalId + ")"); | 319 | // Console.WriteLine("linking new prims " + linkObject.rootLocalID + " to me (" + this.LocalId + ")"); |
320 | //TODO check permissions | 320 | //TODO check permissions |
321 | 321 | ||
322 | m_children.Add(linkObject.rootPrimitive); | 322 | m_children.Add(linkObject.rootPrimitive); |
323 | linkObject.rootPrimitive.SetNewParent(this, m_RootParent); | 323 | linkObject.rootPrimitive.SetNewParent(this, m_RootParent); |
324 | 324 | ||
325 | m_scene.DeleteEntity(linkObject.rootUUID); | 325 | m_scene.DeleteEntity(linkObject.rootUUID); |
326 | linkObject.DeleteAllChildren(); | 326 | linkObject.DeleteAllChildren(); |
@@ -333,7 +333,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
333 | /// </summary> | 333 | /// </summary> |
334 | /// <param name="newParent"></param> | 334 | /// <param name="newParent"></param> |
335 | /// <param name="rootParent"></param> | 335 | /// <param name="rootParent"></param> |
336 | public void SetNewParent(Primitive newParent, SceneObject rootParent) | 336 | public void SetNewParent(Primitive newParent, SceneObjectOLD rootParent) |
337 | { | 337 | { |
338 | LLVector3 oldPos = new LLVector3(Pos.X, Pos.Y, Pos.Z); | 338 | LLVector3 oldPos = new LLVector3(Pos.X, Pos.Y, Pos.Z); |
339 | m_isRootPrim = false; | 339 | m_isRootPrim = false; |
@@ -363,7 +363,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
363 | /// | 363 | /// |
364 | /// </summary> | 364 | /// </summary> |
365 | /// <param name="newRoot"></param> | 365 | /// <param name="newRoot"></param> |
366 | public void SetRootParent(SceneObject newRoot, Primitive newParent, LLVector3 oldParentPosition, | 366 | public void SetRootParent(SceneObjectOLD newRoot, Primitive newParent, LLVector3 oldParentPosition, |
367 | Quaternion oldParentRotation) | 367 | Quaternion oldParentRotation) |
368 | { | 368 | { |
369 | LLVector3 oldPos = new LLVector3(Pos.X, Pos.Y, Pos.Z); | 369 | LLVector3 oldPos = new LLVector3(Pos.X, Pos.Y, Pos.Z); |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index 2f3ce6e..4300ce4 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | |||
@@ -272,14 +272,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
272 | /// <param name="flags"></param> | 272 | /// <param name="flags"></param> |
273 | public void DuplicateObject(uint originalPrim, LLVector3 offset, uint flags) | 273 | public void DuplicateObject(uint originalPrim, LLVector3 offset, uint flags) |
274 | { | 274 | { |
275 | SceneObject originPrim = null; | 275 | SceneObjectGroup originPrim = null; |
276 | foreach (EntityBase ent in Entities.Values) | 276 | foreach (EntityBase ent in Entities.Values) |
277 | { | 277 | { |
278 | if (ent is SceneObject) | 278 | if (ent is SceneObjectGroup) |
279 | { | 279 | { |
280 | if (((SceneObject)ent).rootLocalID == originalPrim) | 280 | if (((SceneObjectGroup)ent).LocalId == originalPrim) |
281 | { | 281 | { |
282 | originPrim = (SceneObject)ent; | 282 | originPrim = (SceneObjectGroup)ent; |
283 | break; | 283 | break; |
284 | } | 284 | } |
285 | } | 285 | } |
@@ -287,15 +287,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
287 | 287 | ||
288 | if (originPrim != null) | 288 | if (originPrim != null) |
289 | { | 289 | { |
290 | SceneObject copy = originPrim.Copy(); | 290 | SceneObjectGroup copy = originPrim.Copy(); |
291 | copy.Pos = copy.Pos + offset; | 291 | copy.Pos = copy.Pos + offset; |
292 | this.Entities.Add(copy.rootUUID, copy); | 292 | this.Entities.Add(copy.UUID, copy); |
293 | 293 | ||
294 | List<ScenePresence> avatars = this.RequestAvatarList(); | 294 | copy.ScheduleGroupForFullUpdate(); |
295 | /* List<ScenePresence> avatars = this.RequestAvatarList(); | ||
295 | for (int i = 0; i < avatars.Count; i++) | 296 | for (int i = 0; i < avatars.Count; i++) |
296 | { | 297 | { |
297 | copy.SendAllChildPrimsToClient(avatars[i].ControllingClient); | 298 | // copy.SendAllChildPrimsToClient(avatars[i].ControllingClient); |
298 | } | 299 | }*/ |
299 | 300 | ||
300 | } | 301 | } |
301 | else | 302 | else |
@@ -312,40 +313,40 @@ namespace OpenSim.Region.Environment.Scenes | |||
312 | /// <param name="childPrims"></param> | 313 | /// <param name="childPrims"></param> |
313 | public void LinkObjects(uint parentPrim, List<uint> childPrims) | 314 | public void LinkObjects(uint parentPrim, List<uint> childPrims) |
314 | { | 315 | { |
315 | SceneObject parenPrim = null; | 316 | SceneObjectGroup parenPrim = null; |
316 | foreach (EntityBase ent in Entities.Values) | 317 | foreach (EntityBase ent in Entities.Values) |
317 | { | 318 | { |
318 | if (ent is SceneObject) | 319 | if (ent is SceneObjectGroup) |
319 | { | 320 | { |
320 | if (((SceneObject)ent).rootLocalID == parentPrim) | 321 | if (((SceneObjectGroup)ent).LocalId == parentPrim) |
321 | { | 322 | { |
322 | parenPrim = (SceneObject)ent; | 323 | parenPrim = (SceneObjectGroup)ent; |
323 | break; | 324 | break; |
324 | } | 325 | } |
325 | } | 326 | } |
326 | } | 327 | } |
327 | 328 | ||
328 | List<SceneObject> children = new List<SceneObject>(); | 329 | List<SceneObjectGroup> children = new List<SceneObjectGroup>(); |
329 | if (parenPrim != null) | 330 | if (parenPrim != null) |
330 | { | 331 | { |
331 | for (int i = 0; i < childPrims.Count; i++) | 332 | for (int i = 0; i < childPrims.Count; i++) |
332 | { | 333 | { |
333 | foreach (EntityBase ent in Entities.Values) | 334 | foreach (EntityBase ent in Entities.Values) |
334 | { | 335 | { |
335 | if (ent is SceneObject) | 336 | if (ent is SceneObjectGroup) |
336 | { | 337 | { |
337 | if (((SceneObject)ent).rootLocalID == childPrims[i]) | 338 | if (((SceneObjectGroup)ent).LocalId == childPrims[i]) |
338 | { | 339 | { |
339 | children.Add((SceneObject)ent); | 340 | children.Add((SceneObjectGroup)ent); |
340 | } | 341 | } |
341 | } | 342 | } |
342 | } | 343 | } |
343 | } | 344 | } |
344 | } | 345 | } |
345 | 346 | ||
346 | foreach (SceneObject sceneObj in children) | 347 | foreach (SceneObjectGroup sceneObj in children) |
347 | { | 348 | { |
348 | parenPrim.AddNewChildPrims(sceneObj); | 349 | parenPrim.LinkToGroup(sceneObj); |
349 | } | 350 | } |
350 | } | 351 | } |
351 | 352 | ||
@@ -356,15 +357,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
356 | /// <param name="shapeBlock"></param> | 357 | /// <param name="shapeBlock"></param> |
357 | public void UpdatePrimShape(uint primLocalID, ObjectShapePacket.ObjectDataBlock shapeBlock) | 358 | public void UpdatePrimShape(uint primLocalID, ObjectShapePacket.ObjectDataBlock shapeBlock) |
358 | { | 359 | { |
359 | Primitive prim = null; | 360 | bool hasPrim = false; |
360 | foreach (EntityBase ent in Entities.Values) | 361 | foreach (EntityBase ent in Entities.Values) |
361 | { | 362 | { |
362 | if (ent is SceneObject) | 363 | if (ent is SceneObjectGroup) |
363 | { | 364 | { |
364 | prim = ((SceneObject)ent).HasChildPrim(primLocalID); | 365 | hasPrim = ((SceneObjectGroup)ent).HasChildPrim(primLocalID); |
365 | if (prim != null) | 366 | if (hasPrim != false) |
366 | { | 367 | { |
367 | prim.UpdateShape(shapeBlock); | 368 | ((SceneObjectGroup)ent).UpdateShape(shapeBlock, primLocalID); |
368 | break; | 369 | break; |
369 | } | 370 | } |
370 | } | 371 | } |
@@ -373,15 +374,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
373 | 374 | ||
374 | public void UpdateExtraParam(uint primLocalID, ushort type, bool inUse, byte[] data) | 375 | public void UpdateExtraParam(uint primLocalID, ushort type, bool inUse, byte[] data) |
375 | { | 376 | { |
376 | Primitive prim = null; | 377 | bool hasPrim = false; |
377 | foreach (EntityBase ent in Entities.Values) | 378 | foreach (EntityBase ent in Entities.Values) |
378 | { | 379 | { |
379 | if (ent is SceneObject) | 380 | if (ent is SceneObjectGroup) |
380 | { | 381 | { |
381 | prim = ((SceneObject)ent).HasChildPrim(primLocalID); | 382 | hasPrim = ((SceneObjectGroup)ent).HasChildPrim(primLocalID); |
382 | if (prim != null) | 383 | if (hasPrim != false) |
383 | { | 384 | { |
384 | prim.UpdateExtraParam(type, inUse, data); | 385 | ((SceneObjectGroup)ent).UpdateExtraParam(primLocalID, type, inUse, data); |
385 | break; | 386 | break; |
386 | } | 387 | } |
387 | } | 388 | } |
@@ -395,15 +396,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
395 | /// <param name="primLocalID"></param> | 396 | /// <param name="primLocalID"></param> |
396 | public void RequestTaskInventory(IClientAPI remoteClient, uint primLocalID) | 397 | public void RequestTaskInventory(IClientAPI remoteClient, uint primLocalID) |
397 | { | 398 | { |
398 | Primitive prim = null; | 399 | |
400 | bool hasPrim = false; | ||
399 | foreach (EntityBase ent in Entities.Values) | 401 | foreach (EntityBase ent in Entities.Values) |
400 | { | 402 | { |
401 | if (ent is SceneObject) | 403 | if (ent is SceneObjectGroup) |
402 | { | 404 | { |
403 | prim = ((SceneObject)ent).HasChildPrim(primLocalID); | 405 | hasPrim = ((SceneObjectGroup)ent).HasChildPrim(primLocalID); |
404 | if (prim != null) | 406 | if (hasPrim != false) |
405 | { | 407 | { |
406 | prim.GetInventory(remoteClient, primLocalID); | 408 | ((SceneObjectGroup)ent).GetPartInventory(remoteClient, primLocalID); |
407 | break; | 409 | break; |
408 | } | 410 | } |
409 | } | 411 | } |
@@ -419,12 +421,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
419 | { | 421 | { |
420 | foreach (EntityBase ent in Entities.Values) | 422 | foreach (EntityBase ent in Entities.Values) |
421 | { | 423 | { |
422 | if (ent is SceneObject) | 424 | if (ent is SceneObjectGroup) |
423 | { | 425 | { |
424 | if (((SceneObject)ent).rootLocalID == primLocalID) | 426 | if (((SceneObjectGroup)ent).LocalId == primLocalID) |
425 | { | 427 | { |
426 | ((SceneObject)ent).GetProperites(remoteClient); | 428 | ((SceneObjectGroup)ent).GetProperites(remoteClient); |
427 | ((SceneObject)ent).isSelected = true; | 429 | ((SceneObjectGroup)ent).IsSelected = true; |
428 | this.LandManager.setPrimsTainted(); | 430 | this.LandManager.setPrimsTainted(); |
429 | break; | 431 | break; |
430 | } | 432 | } |
@@ -441,11 +443,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
441 | { | 443 | { |
442 | foreach (EntityBase ent in Entities.Values) | 444 | foreach (EntityBase ent in Entities.Values) |
443 | { | 445 | { |
444 | if (ent is SceneObject) | 446 | if (ent is SceneObjectGroup) |
445 | { | 447 | { |
446 | if (((SceneObject)ent).rootLocalID == primLocalID) | 448 | if (((SceneObjectGroup)ent).LocalId == primLocalID) |
447 | { | 449 | { |
448 | ((SceneObject)ent).isSelected = false; | 450 | ((SceneObjectGroup)ent).IsSelected = false; |
449 | this.LandManager.setPrimsTainted(); | 451 | this.LandManager.setPrimsTainted(); |
450 | break; | 452 | break; |
451 | } | 453 | } |
@@ -460,15 +462,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
460 | /// <param name="description"></param> | 462 | /// <param name="description"></param> |
461 | public void PrimDescription(uint primLocalID, string description) | 463 | public void PrimDescription(uint primLocalID, string description) |
462 | { | 464 | { |
463 | Primitive prim = null; | 465 | bool hasPrim = false; |
464 | foreach (EntityBase ent in Entities.Values) | 466 | foreach (EntityBase ent in Entities.Values) |
465 | { | 467 | { |
466 | if (ent is SceneObject) | 468 | if (ent is SceneObjectGroup) |
467 | { | 469 | { |
468 | prim = ((SceneObject)ent).HasChildPrim(primLocalID); | 470 | hasPrim = ((SceneObjectGroup)ent).HasChildPrim(primLocalID); |
469 | if (prim != null) | 471 | if (hasPrim != false) |
470 | { | 472 | { |
471 | prim.Description = description; | 473 | ((SceneObjectGroup)ent).SetPartDescription(description, primLocalID); |
472 | break; | 474 | break; |
473 | } | 475 | } |
474 | } | 476 | } |
@@ -482,15 +484,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
482 | /// <param name="description"></param> | 484 | /// <param name="description"></param> |
483 | public void PrimName(uint primLocalID, string name) | 485 | public void PrimName(uint primLocalID, string name) |
484 | { | 486 | { |
485 | Primitive prim = null; | 487 | bool hasPrim = false; |
486 | foreach (EntityBase ent in Entities.Values) | 488 | foreach (EntityBase ent in Entities.Values) |
487 | { | 489 | { |
488 | if (ent is SceneObject) | 490 | if (ent is SceneObjectGroup) |
489 | { | 491 | { |
490 | prim = ((SceneObject)ent).HasChildPrim(primLocalID); | 492 | hasPrim = ((SceneObjectGroup)ent).HasChildPrim(primLocalID); |
491 | if (prim != null) | 493 | if (hasPrim != false) |
492 | { | 494 | { |
493 | prim.Name = name; | 495 | ((SceneObjectGroup)ent).SetPartName(name, primLocalID); |
494 | break; | 496 | break; |
495 | } | 497 | } |
496 | } | 498 | } |
@@ -499,27 +501,19 @@ namespace OpenSim.Region.Environment.Scenes | |||
499 | 501 | ||
500 | public void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 pos, IClientAPI remoteClient) | 502 | public void MoveObject(LLUUID objectID, LLVector3 offset, LLVector3 pos, IClientAPI remoteClient) |
501 | { | 503 | { |
502 | Primitive prim = null; | 504 | bool hasPrim = false; |
503 | foreach (EntityBase ent in Entities.Values) | 505 | foreach (EntityBase ent in Entities.Values) |
504 | { | 506 | { |
505 | if (ent is SceneObject) | 507 | if (ent is SceneObjectGroup) |
506 | { | 508 | { |
507 | prim = ((SceneObject)ent).HasChildPrim(objectID); | 509 | hasPrim = ((SceneObjectGroup)ent).HasChildPrim(objectID); |
508 | if (prim != null) | 510 | if (hasPrim != false) |
509 | { | 511 | { |
510 | ((SceneObject)ent).GrapMovement(offset, pos, remoteClient); | 512 | ((SceneObjectGroup)ent).GrapMovement(offset, pos, remoteClient); |
511 | break; | 513 | break; |
512 | } | 514 | } |
513 | } | 515 | } |
514 | } | 516 | } |
515 | /* | ||
516 | if (this.Entities.ContainsKey(objectID)) | ||
517 | { | ||
518 | if (this.Entities[objectID] is SceneObject) | ||
519 | { | ||
520 | ((SceneObject)this.Entities[objectID]).GrapMovement(offset, pos, remoteClient); | ||
521 | } | ||
522 | }*/ | ||
523 | } | 517 | } |
524 | 518 | ||
525 | /// <summary> | 519 | /// <summary> |
@@ -541,15 +535,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
541 | /// <param name="remoteClient"></param> | 535 | /// <param name="remoteClient"></param> |
542 | public void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient) | 536 | public void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient) |
543 | { | 537 | { |
544 | Primitive prim = null; | 538 | bool hasPrim = false; |
545 | foreach (EntityBase ent in Entities.Values) | 539 | foreach (EntityBase ent in Entities.Values) |
546 | { | 540 | { |
547 | if (ent is SceneObject) | 541 | if (ent is SceneObjectGroup) |
548 | { | 542 | { |
549 | prim = ((SceneObject)ent).HasChildPrim(localID); | 543 | hasPrim = ((SceneObjectGroup)ent).HasChildPrim(localID); |
550 | if (prim != null) | 544 | if (hasPrim != false) |
551 | { | 545 | { |
552 | prim.UpdateTextureEntry(texture); | 546 | ((SceneObjectGroup)ent).UpdateTextureEntry(localID, texture); |
547 | break; | ||
553 | } | 548 | } |
554 | } | 549 | } |
555 | } | 550 | } |
@@ -563,15 +558,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
563 | /// <param name="remoteClient"></param> | 558 | /// <param name="remoteClient"></param> |
564 | public void UpdatePrimPosition(uint localID, LLVector3 pos, IClientAPI remoteClient) | 559 | public void UpdatePrimPosition(uint localID, LLVector3 pos, IClientAPI remoteClient) |
565 | { | 560 | { |
566 | Primitive prim = null; | 561 | bool hasPrim = false; |
567 | foreach (EntityBase ent in Entities.Values) | 562 | foreach (EntityBase ent in Entities.Values) |
568 | { | 563 | { |
569 | if (ent is SceneObject) | 564 | if (ent is SceneObjectGroup) |
570 | { | 565 | { |
571 | prim = ((SceneObject)ent).HasChildPrim(localID); | 566 | hasPrim = ((SceneObjectGroup)ent).HasChildPrim(localID); |
572 | if (prim != null) | 567 | if (hasPrim != false) |
573 | { | 568 | { |
574 | prim.UpdateGroupPosition(pos); | 569 | ((SceneObjectGroup)ent).UpdateGroupPosition(pos); |
575 | break; | 570 | break; |
576 | } | 571 | } |
577 | } | 572 | } |
@@ -583,9 +578,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
583 | Primitive prim = null; | 578 | Primitive prim = null; |
584 | foreach (EntityBase ent in Entities.Values) | 579 | foreach (EntityBase ent in Entities.Values) |
585 | { | 580 | { |
586 | if (ent is SceneObject) | 581 | if (ent is SceneObjectGroup) |
587 | { | 582 | { |
588 | prim = ((SceneObject)ent).HasChildPrim(localID); | 583 | //prim = ((SceneObject)ent).HasChildPrim(localID); |
589 | if (prim != null) | 584 | if (prim != null) |
590 | { | 585 | { |
591 | prim.UpdateSinglePosition(pos); | 586 | prim.UpdateSinglePosition(pos); |
@@ -604,15 +599,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
604 | /// <param name="remoteClient"></param> | 599 | /// <param name="remoteClient"></param> |
605 | public void UpdatePrimRotation(uint localID, LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient) | 600 | public void UpdatePrimRotation(uint localID, LLVector3 pos, LLQuaternion rot, IClientAPI remoteClient) |
606 | { | 601 | { |
607 | Primitive prim = null; | 602 | bool hasPrim = false; |
608 | foreach (EntityBase ent in Entities.Values) | 603 | foreach (EntityBase ent in Entities.Values) |
609 | { | 604 | { |
610 | if (ent is SceneObject) | 605 | if (ent is SceneObjectGroup) |
611 | { | 606 | { |
612 | prim = ((SceneObject)ent).HasChildPrim(localID); | 607 | hasPrim = ((SceneObjectGroup)ent).HasChildPrim(localID); |
613 | if (prim != null) | 608 | if (hasPrim != false) |
614 | { | 609 | { |
615 | prim.UpdateGroupMouseRotation(pos, rot); | 610 | ((SceneObjectGroup)ent).UpdateGroupRotation(pos, rot); |
611 | // prim.UpdateGroupMouseRotation(pos, rot); | ||
616 | break; | 612 | break; |
617 | } | 613 | } |
618 | } | 614 | } |
@@ -627,15 +623,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
627 | /// <param name="remoteClient"></param> | 623 | /// <param name="remoteClient"></param> |
628 | public void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient) | 624 | public void UpdatePrimRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient) |
629 | { | 625 | { |
630 | Primitive prim = null; | 626 | bool hasPrim = false; |
631 | foreach (EntityBase ent in Entities.Values) | 627 | foreach (EntityBase ent in Entities.Values) |
632 | { | 628 | { |
633 | if (ent is SceneObject) | 629 | if (ent is SceneObjectGroup) |
634 | { | 630 | { |
635 | prim = ((SceneObject)ent).HasChildPrim(localID); | 631 | hasPrim = ((SceneObjectGroup)ent).HasChildPrim(localID); |
636 | if (prim != null) | 632 | if (hasPrim != false) |
637 | { | 633 | { |
638 | prim.UpdateGroupRotation(rot); | 634 | ((SceneObjectGroup)ent).UpdateGroupRotation(rot); |
635 | //prim.UpdateGroupRotation(rot); | ||
639 | break; | 636 | break; |
640 | } | 637 | } |
641 | } | 638 | } |
@@ -654,9 +651,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
654 | Primitive prim = null; | 651 | Primitive prim = null; |
655 | foreach (EntityBase ent in Entities.Values) | 652 | foreach (EntityBase ent in Entities.Values) |
656 | { | 653 | { |
657 | if (ent is SceneObject) | 654 | if (ent is SceneObjectGroup) |
658 | { | 655 | { |
659 | prim = ((SceneObject)ent).HasChildPrim(localID); | 656 | // prim = ((SceneObject)ent).HasChildPrim(localID); |
660 | if (prim != null) | 657 | if (prim != null) |
661 | { | 658 | { |
662 | prim.UpdateSingleRotation(rot); | 659 | prim.UpdateSingleRotation(rot); |
@@ -674,15 +671,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
674 | /// <param name="remoteClient"></param> | 671 | /// <param name="remoteClient"></param> |
675 | public void UpdatePrimScale(uint localID, LLVector3 scale, IClientAPI remoteClient) | 672 | public void UpdatePrimScale(uint localID, LLVector3 scale, IClientAPI remoteClient) |
676 | { | 673 | { |
677 | Primitive prim = null; | 674 | bool hasPrim = false; |
678 | foreach (EntityBase ent in Entities.Values) | 675 | foreach (EntityBase ent in Entities.Values) |
679 | { | 676 | { |
680 | if (ent is SceneObject) | 677 | if (ent is SceneObjectGroup) |
681 | { | 678 | { |
682 | prim = ((SceneObject)ent).HasChildPrim(localID); | 679 | hasPrim = ((SceneObjectGroup)ent).HasChildPrim(localID); |
683 | if (prim != null) | 680 | if (hasPrim != false) |
684 | { | 681 | { |
685 | prim.ResizeGoup(scale); | 682 | ((SceneObjectGroup)ent).Resize(scale, localID); |
683 | // prim.ResizeGoup(scale); | ||
686 | break; | 684 | break; |
687 | } | 685 | } |
688 | } | 686 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 813308b..c2eac60 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -54,7 +54,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
54 | { | 54 | { |
55 | protected Timer m_heartbeatTimer = new Timer(); | 55 | protected Timer m_heartbeatTimer = new Timer(); |
56 | protected Dictionary<LLUUID, ScenePresence> Avatars; | 56 | protected Dictionary<LLUUID, ScenePresence> Avatars; |
57 | protected Dictionary<LLUUID, SceneObject> Prims; | 57 | protected Dictionary<LLUUID, SceneObjectGroup> Prims; |
58 | protected PhysicsScene phyScene; | 58 | protected PhysicsScene phyScene; |
59 | protected float timeStep = 0.1f; | 59 | protected float timeStep = 0.1f; |
60 | private Random Rand = new Random(); | 60 | private Random Rand = new Random(); |
@@ -109,7 +109,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
109 | get { return m_scriptManager; } | 109 | get { return m_scriptManager; } |
110 | } | 110 | } |
111 | 111 | ||
112 | public Dictionary<LLUUID, SceneObject> Objects | 112 | public Dictionary<LLUUID, SceneObjectGroup> Objects |
113 | { | 113 | { |
114 | get { return Prims; } | 114 | get { return Prims; } |
115 | } | 115 | } |
@@ -149,11 +149,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
149 | MainLog.Instance.Verbose("Creating new entitities instance"); | 149 | MainLog.Instance.Verbose("Creating new entitities instance"); |
150 | Entities = new Dictionary<LLUUID, EntityBase>(); | 150 | Entities = new Dictionary<LLUUID, EntityBase>(); |
151 | Avatars = new Dictionary<LLUUID, ScenePresence>(); | 151 | Avatars = new Dictionary<LLUUID, ScenePresence>(); |
152 | Prims = new Dictionary<LLUUID, SceneObject>(); | 152 | Prims = new Dictionary<LLUUID, SceneObjectGroup>(); |
153 | 153 | ||
154 | MainLog.Instance.Verbose("Loading objects from datastore"); | 154 | MainLog.Instance.Verbose("Loading objects from datastore"); |
155 | List<SceneObject> PrimsFromDB = storageManager.DataStore.LoadObjects(); | 155 | List<SceneObjectGroup> PrimsFromDB = storageManager.DataStore.LoadObjects(); |
156 | foreach (SceneObject prim in PrimsFromDB) | 156 | foreach (SceneObjectGroup prim in PrimsFromDB) |
157 | { | 157 | { |
158 | AddEntity(prim); | 158 | AddEntity(prim); |
159 | } | 159 | } |
@@ -463,10 +463,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
463 | public void LoadPrimsFromStorage() | 463 | public void LoadPrimsFromStorage() |
464 | { | 464 | { |
465 | MainLog.Instance.Verbose("World.cs: LoadPrimsFromStorage() - Loading primitives"); | 465 | MainLog.Instance.Verbose("World.cs: LoadPrimsFromStorage() - Loading primitives"); |
466 | List<SceneObject> NewObjectsList = storageManager.DataStore.LoadObjects(); | 466 | List<SceneObjectGroup> NewObjectsList = storageManager.DataStore.LoadObjects(); |
467 | foreach (SceneObject obj in NewObjectsList) | 467 | foreach (SceneObjectGroup obj in NewObjectsList) |
468 | { | 468 | { |
469 | this.Objects.Add(obj.rootUUID, obj); | 469 | this.Objects.Add(obj.UUID, obj); |
470 | } | 470 | } |
471 | } | 471 | } |
472 | 472 | ||
@@ -501,7 +501,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
501 | /// <param name="ownerID"></param> | 501 | /// <param name="ownerID"></param> |
502 | public void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape) | 502 | public void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape) |
503 | { | 503 | { |
504 | SceneObject sceneOb = new SceneObject(this, m_eventManager, ownerID, PrimIDAllocate(), pos, shape); | 504 | SceneObjectGroup sceneOb = new SceneObjectGroup(this, this.m_regionHandle, ownerID, PrimIDAllocate(), pos, shape); |
505 | AddEntity(sceneOb); | 505 | AddEntity(sceneOb); |
506 | } | 506 | } |
507 | 507 | ||
@@ -509,28 +509,28 @@ namespace OpenSim.Region.Environment.Scenes | |||
509 | { | 509 | { |
510 | foreach (EntityBase obj in Entities.Values) | 510 | foreach (EntityBase obj in Entities.Values) |
511 | { | 511 | { |
512 | if (obj is SceneObject) | 512 | if (obj is SceneObjectGroup) |
513 | { | 513 | { |
514 | if (((SceneObject) obj).LocalId == localID) | 514 | if (((SceneObjectGroup) obj).LocalId == localID) |
515 | { | 515 | { |
516 | RemoveEntity((SceneObject) obj); | 516 | RemoveEntity((SceneObjectGroup) obj); |
517 | return; | 517 | return; |
518 | } | 518 | } |
519 | } | 519 | } |
520 | } | 520 | } |
521 | } | 521 | } |
522 | 522 | ||
523 | public void AddEntity(SceneObject sceneObject) | 523 | public void AddEntity(SceneObjectGroup sceneObject) |
524 | { | 524 | { |
525 | Entities.Add(sceneObject.rootUUID, sceneObject); | 525 | Entities.Add(sceneObject.UUID, sceneObject); |
526 | } | 526 | } |
527 | 527 | ||
528 | public void RemoveEntity(SceneObject sceneObject) | 528 | public void RemoveEntity(SceneObjectGroup sceneObject) |
529 | { | 529 | { |
530 | if (Entities.ContainsKey(sceneObject.rootUUID)) | 530 | if (Entities.ContainsKey(sceneObject.UUID)) |
531 | { | 531 | { |
532 | m_LandManager.removePrimFromLandPrimCounts(sceneObject); | 532 | m_LandManager.removePrimFromLandPrimCounts(sceneObject); |
533 | Entities.Remove(sceneObject.rootUUID); | 533 | Entities.Remove(sceneObject.UUID); |
534 | m_LandManager.setPrimsTainted(); | 534 | m_LandManager.setPrimsTainted(); |
535 | } | 535 | } |
536 | } | 536 | } |
@@ -779,9 +779,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
779 | { | 779 | { |
780 | foreach (EntityBase ent in Entities.Values) | 780 | foreach (EntityBase ent in Entities.Values) |
781 | { | 781 | { |
782 | if (ent is SceneObject) | 782 | if (ent is SceneObjectGroup) |
783 | { | 783 | { |
784 | ((SceneObject) ent).SendAllChildPrimsToClient(client); | 784 | // ((SceneObject) ent).SendAllChildPrimsToClient(client); |
785 | } | 785 | } |
786 | } | 786 | } |
787 | } | 787 | } |
diff --git a/OpenSim/Region/Environment/Scenes/SceneEvents.cs b/OpenSim/Region/Environment/Scenes/SceneEvents.cs index eb1d5b4..1df95cf 100644 --- a/OpenSim/Region/Environment/Scenes/SceneEvents.cs +++ b/OpenSim/Region/Environment/Scenes/SceneEvents.cs | |||
@@ -22,7 +22,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
22 | public delegate void OnParcelPrimCountUpdateDelegate(); | 22 | public delegate void OnParcelPrimCountUpdateDelegate(); |
23 | public event OnParcelPrimCountUpdateDelegate OnParcelPrimCountUpdate; | 23 | public event OnParcelPrimCountUpdateDelegate OnParcelPrimCountUpdate; |
24 | 24 | ||
25 | public delegate void OnParcelPrimCountAddDelegate(SceneObject obj); | 25 | public delegate void OnParcelPrimCountAddDelegate(SceneObjectGroup obj); |
26 | public event OnParcelPrimCountAddDelegate OnParcelPrimCountAdd; | 26 | public event OnParcelPrimCountAddDelegate OnParcelPrimCountAdd; |
27 | 27 | ||
28 | public delegate void OnScriptConsoleDelegate(string[] args); | 28 | public delegate void OnScriptConsoleDelegate(string[] args); |
@@ -74,7 +74,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
74 | OnParcelPrimCountUpdate(); | 74 | OnParcelPrimCountUpdate(); |
75 | } | 75 | } |
76 | } | 76 | } |
77 | public void TriggerParcelPrimCountAdd(SceneObject obj) | 77 | public void TriggerParcelPrimCountAdd(SceneObjectGroup obj) |
78 | { | 78 | { |
79 | if (OnParcelPrimCountAdd != null) | 79 | if (OnParcelPrimCountAdd != null) |
80 | { | 80 | { |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObject.cs b/OpenSim/Region/Environment/Scenes/SceneObject(Old).cs index 2fae556..882b72e 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObject.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObject(Old).cs | |||
@@ -38,7 +38,7 @@ using OpenSim.Physics.Manager; | |||
38 | 38 | ||
39 | namespace OpenSim.Region.Environment.Scenes | 39 | namespace OpenSim.Region.Environment.Scenes |
40 | { | 40 | { |
41 | public class SceneObject : EntityBase | 41 | public class SceneObjectOLD : EntityBase |
42 | { | 42 | { |
43 | private Encoding enc = Encoding.ASCII; | 43 | private Encoding enc = Encoding.ASCII; |
44 | private Dictionary<LLUUID, Primitive> ChildPrimitives = new Dictionary<LLUUID, Primitive>(); //list of all primitive id's that are part of this group | 44 | private Dictionary<LLUUID, Primitive> ChildPrimitives = new Dictionary<LLUUID, Primitive>(); //list of all primitive id's that are part of this group |
@@ -86,7 +86,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
86 | /// <summary> | 86 | /// <summary> |
87 | /// | 87 | /// |
88 | /// </summary> | 88 | /// </summary> |
89 | public SceneObject(Scene world, EventManager eventManager, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape) | 89 | public SceneObjectOLD(Scene world, EventManager eventManager, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape) |
90 | { | 90 | { |
91 | m_regionHandle = world.RegionInfo.RegionHandle; | 91 | m_regionHandle = world.RegionInfo.RegionHandle; |
92 | m_scene = world; | 92 | m_scene = world; |
@@ -102,7 +102,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
102 | /// | 102 | /// |
103 | /// </summary> | 103 | /// </summary> |
104 | /// <remarks>Need a null constructor for duplication</remarks> | 104 | /// <remarks>Need a null constructor for duplication</remarks> |
105 | public SceneObject() | 105 | public SceneObjectOLD() |
106 | { | 106 | { |
107 | 107 | ||
108 | } | 108 | } |
@@ -125,7 +125,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
125 | /// <param name="datastore"></param> | 125 | /// <param name="datastore"></param> |
126 | public void ProcessBackup(OpenSim.Region.Interfaces.IRegionDataStore datastore) | 126 | public void ProcessBackup(OpenSim.Region.Interfaces.IRegionDataStore datastore) |
127 | { | 127 | { |
128 | datastore.StoreObject(this); | 128 | // datastore.StoreObject(this); |
129 | } | 129 | } |
130 | 130 | ||
131 | /// <summary> | 131 | /// <summary> |
@@ -134,7 +134,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
134 | private void ProcessParcelPrimCountUpdate() | 134 | private void ProcessParcelPrimCountUpdate() |
135 | { | 135 | { |
136 | 136 | ||
137 | m_eventManager.TriggerParcelPrimCountAdd(this); | 137 | // m_eventManager.TriggerParcelPrimCountAdd(this); |
138 | } | 138 | } |
139 | 139 | ||
140 | /// <summary> | 140 | /// <summary> |
@@ -146,7 +146,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
146 | public void CreateRootFromShape(LLUUID agentID, uint localID, PrimitiveBaseShape shape, LLVector3 pos) | 146 | public void CreateRootFromShape(LLUUID agentID, uint localID, PrimitiveBaseShape shape, LLVector3 pos) |
147 | { | 147 | { |
148 | 148 | ||
149 | this.rootPrimitive = new Primitive(this.m_regionHandle, this.m_scene, agentID, localID, true, this, this, shape, pos); | 149 | // this.rootPrimitive = new Primitive(this.m_regionHandle, this.m_scene, agentID, localID, true, this, this, shape, pos); |
150 | this.m_children.Add(rootPrimitive); | 150 | this.m_children.Add(rootPrimitive); |
151 | 151 | ||
152 | this.ChildPrimitives.Add(this.rootUUID, this.rootPrimitive); | 152 | this.ChildPrimitives.Add(this.rootUUID, this.rootPrimitive); |
@@ -165,9 +165,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
165 | /// Makes a copy of this SceneObject (and child primitives) | 165 | /// Makes a copy of this SceneObject (and child primitives) |
166 | /// </summary> | 166 | /// </summary> |
167 | /// <returns>A complete copy of the object</returns> | 167 | /// <returns>A complete copy of the object</returns> |
168 | public new SceneObject Copy() | 168 | public new SceneObjectOLD Copy() |
169 | { | 169 | { |
170 | SceneObject dupe = new SceneObject(); | 170 | SceneObjectOLD dupe = new SceneObjectOLD(); |
171 | 171 | ||
172 | dupe.m_scene = this.m_scene; | 172 | dupe.m_scene = this.m_scene; |
173 | dupe.m_eventManager = this.m_eventManager; | 173 | dupe.m_eventManager = this.m_eventManager; |
@@ -207,7 +207,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
207 | /// | 207 | /// |
208 | /// </summary> | 208 | /// </summary> |
209 | /// <param name="primObject"></param> | 209 | /// <param name="primObject"></param> |
210 | public void AddNewChildPrims(SceneObject primObject) | 210 | public void AddNewChildPrims(SceneObjectOLD primObject) |
211 | { | 211 | { |
212 | this.rootPrimitive.AddNewChildren(primObject); | 212 | this.rootPrimitive.AddNewChildren(primObject); |
213 | } | 213 | } |
diff --git a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectGroup2.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 86610c0..b7bc229 100644 --- a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectGroup2.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -11,12 +11,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
11 | { | 11 | { |
12 | // public delegate void PrimCountTaintedDelegate(); | 12 | // public delegate void PrimCountTaintedDelegate(); |
13 | 13 | ||
14 | public class AllNewSceneObjectGroup2 : EntityBase | 14 | public class SceneObjectGroup : EntityBase |
15 | { | 15 | { |
16 | private Encoding enc = Encoding.ASCII; | 16 | private Encoding enc = Encoding.ASCII; |
17 | 17 | ||
18 | protected AllNewSceneObjectPart2 m_rootPart; | 18 | protected SceneObjectPart m_rootPart; |
19 | protected Dictionary<LLUUID, AllNewSceneObjectPart2> m_parts = new Dictionary<LLUUID, AllNewSceneObjectPart2>(); | 19 | protected Dictionary<LLUUID, SceneObjectPart> m_parts = new Dictionary<LLUUID, SceneObjectPart>(); |
20 | 20 | ||
21 | protected ulong m_regionHandle; | 21 | protected ulong m_regionHandle; |
22 | 22 | ||
@@ -38,6 +38,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
38 | get { return new LLVector3(0, 0, 0); } | 38 | get { return new LLVector3(0, 0, 0); } |
39 | } | 39 | } |
40 | 40 | ||
41 | public Dictionary<LLUUID, SceneObjectPart> Children | ||
42 | { | ||
43 | get { return this.m_parts; } | ||
44 | set { m_parts = value; } | ||
45 | } | ||
46 | |||
41 | public override LLVector3 Pos | 47 | public override LLVector3 Pos |
42 | { | 48 | { |
43 | get { return m_rootPart.GroupPosition; } | 49 | get { return m_rootPart.GroupPosition; } |
@@ -45,7 +51,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
45 | { | 51 | { |
46 | lock (this.m_parts) | 52 | lock (this.m_parts) |
47 | { | 53 | { |
48 | foreach (AllNewSceneObjectPart2 part in this.m_parts.Values) | 54 | foreach (SceneObjectPart part in this.m_parts.Values) |
49 | { | 55 | { |
50 | part.GroupPosition = value; | 56 | part.GroupPosition = value; |
51 | } | 57 | } |
@@ -65,10 +71,29 @@ namespace OpenSim.Region.Environment.Scenes | |||
65 | set { m_rootPart.UUID = value; } | 71 | set { m_rootPart.UUID = value; } |
66 | } | 72 | } |
67 | 73 | ||
74 | public LLUUID OwnerID | ||
75 | { | ||
76 | get { return m_rootPart.OwnerID; } | ||
77 | } | ||
78 | |||
79 | /// <summary> | ||
80 | /// Added because the Parcel code seems to use it | ||
81 | /// but not sure a object should have this | ||
82 | /// as what does it tell us? that some avatar has selected it | ||
83 | /// think really there should be a list (or whatever) in each scenepresence | ||
84 | /// saying what prim(s) that user has selected at any time. | ||
85 | /// </summary> | ||
86 | protected bool m_isSelected = false; | ||
87 | public bool IsSelected | ||
88 | { | ||
89 | get{ return m_isSelected;} | ||
90 | set { m_isSelected = value; } | ||
91 | } | ||
92 | |||
68 | /// <summary> | 93 | /// <summary> |
69 | /// | 94 | /// |
70 | /// </summary> | 95 | /// </summary> |
71 | public AllNewSceneObjectGroup2() | 96 | public SceneObjectGroup() |
72 | { | 97 | { |
73 | 98 | ||
74 | } | 99 | } |
@@ -76,7 +101,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
76 | /// <summary> | 101 | /// <summary> |
77 | /// | 102 | /// |
78 | /// </summary> | 103 | /// </summary> |
79 | public AllNewSceneObjectGroup2(byte[] data) | 104 | public SceneObjectGroup(byte[] data) |
80 | { | 105 | { |
81 | 106 | ||
82 | } | 107 | } |
@@ -84,14 +109,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
84 | /// <summary> | 109 | /// <summary> |
85 | /// | 110 | /// |
86 | /// </summary> | 111 | /// </summary> |
87 | public AllNewSceneObjectGroup2(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape) | 112 | public SceneObjectGroup(Scene scene, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape) |
88 | { | 113 | { |
89 | m_regionHandle = regionHandle; | 114 | m_regionHandle = regionHandle; |
90 | m_scene = scene; | 115 | m_scene = scene; |
91 | 116 | ||
92 | this.Pos = pos; | 117 | this.Pos = pos; |
93 | LLVector3 rootOffset = new LLVector3(0, 0, 0); | 118 | LLVector3 rootOffset = new LLVector3(0, 0, 0); |
94 | AllNewSceneObjectPart2 newPart = new AllNewSceneObjectPart2(m_regionHandle, this, ownerID, localID, shape, pos, rootOffset); | 119 | SceneObjectPart newPart = new SceneObjectPart(m_regionHandle, this, ownerID, localID, shape, pos, rootOffset); |
95 | this.m_parts.Add(newPart.UUID, newPart); | 120 | this.m_parts.Add(newPart.UUID, newPart); |
96 | this.SetPartAsRoot(newPart); | 121 | this.SetPartAsRoot(newPart); |
97 | } | 122 | } |
@@ -102,16 +127,16 @@ namespace OpenSim.Region.Environment.Scenes | |||
102 | /// | 127 | /// |
103 | /// </summary> | 128 | /// </summary> |
104 | /// <returns></returns> | 129 | /// <returns></returns> |
105 | public new AllNewSceneObjectGroup2 Copy() | 130 | public new SceneObjectGroup Copy() |
106 | { | 131 | { |
107 | AllNewSceneObjectGroup2 dupe = (AllNewSceneObjectGroup2)this.MemberwiseClone(); | 132 | SceneObjectGroup dupe = (SceneObjectGroup)this.MemberwiseClone(); |
108 | dupe.Pos = new LLVector3(Pos.X, Pos.Y, Pos.Z); | 133 | dupe.Pos = new LLVector3(Pos.X, Pos.Y, Pos.Z); |
109 | dupe.m_scene = m_scene; | 134 | dupe.m_scene = m_scene; |
110 | dupe.m_regionHandle = this.m_regionHandle; | 135 | dupe.m_regionHandle = this.m_regionHandle; |
111 | 136 | ||
112 | dupe.CopyRootPart(this.m_rootPart); | 137 | dupe.CopyRootPart(this.m_rootPart); |
113 | 138 | ||
114 | foreach (AllNewSceneObjectPart2 part in this.m_parts.Values) | 139 | foreach (SceneObjectPart part in this.m_parts.Values) |
115 | { | 140 | { |
116 | if (part.UUID != this.m_rootPart.UUID) | 141 | if (part.UUID != this.m_rootPart.UUID) |
117 | { | 142 | { |
@@ -125,9 +150,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
125 | /// | 150 | /// |
126 | /// </summary> | 151 | /// </summary> |
127 | /// <param name="part"></param> | 152 | /// <param name="part"></param> |
128 | public void CopyRootPart(AllNewSceneObjectPart2 part) | 153 | public void CopyRootPart(SceneObjectPart part) |
129 | { | 154 | { |
130 | AllNewSceneObjectPart2 newPart = part.Copy(m_scene.PrimIDAllocate()); | 155 | SceneObjectPart newPart = part.Copy(m_scene.PrimIDAllocate()); |
131 | this.m_parts.Add(newPart.UUID, newPart); | 156 | this.m_parts.Add(newPart.UUID, newPart); |
132 | this.SetPartAsRoot(newPart); | 157 | this.SetPartAsRoot(newPart); |
133 | } | 158 | } |
@@ -136,9 +161,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
136 | /// | 161 | /// |
137 | /// </summary> | 162 | /// </summary> |
138 | /// <param name="part"></param> | 163 | /// <param name="part"></param> |
139 | public void CopyPart(AllNewSceneObjectPart2 part) | 164 | public void CopyPart(SceneObjectPart part) |
140 | { | 165 | { |
141 | AllNewSceneObjectPart2 newPart = part.Copy(m_scene.PrimIDAllocate()); | 166 | SceneObjectPart newPart = part.Copy(m_scene.PrimIDAllocate()); |
142 | this.m_parts.Add(newPart.UUID, newPart); | 167 | this.m_parts.Add(newPart.UUID, newPart); |
143 | this.SetPartAsNonRoot(newPart); | 168 | this.SetPartAsNonRoot(newPart); |
144 | } | 169 | } |
@@ -149,7 +174,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
149 | /// </summary> | 174 | /// </summary> |
150 | public override void Update() | 175 | public override void Update() |
151 | { | 176 | { |
152 | foreach (AllNewSceneObjectPart2 part in this.m_parts.Values) | 177 | foreach (SceneObjectPart part in this.m_parts.Values) |
153 | { | 178 | { |
154 | part.SendScheduledUpdates(); | 179 | part.SendScheduledUpdates(); |
155 | } | 180 | } |
@@ -160,7 +185,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
160 | /// </summary> | 185 | /// </summary> |
161 | public void ScheduleGroupForFullUpdate() | 186 | public void ScheduleGroupForFullUpdate() |
162 | { | 187 | { |
163 | foreach (AllNewSceneObjectPart2 part in this.m_parts.Values) | 188 | foreach (SceneObjectPart part in this.m_parts.Values) |
164 | { | 189 | { |
165 | part.ScheduleFullUpdate(); | 190 | part.ScheduleFullUpdate(); |
166 | } | 191 | } |
@@ -171,7 +196,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
171 | /// </summary> | 196 | /// </summary> |
172 | public void ScheduleGroupForTerseUpdate() | 197 | public void ScheduleGroupForTerseUpdate() |
173 | { | 198 | { |
174 | foreach (AllNewSceneObjectPart2 part in this.m_parts.Values) | 199 | foreach (SceneObjectPart part in this.m_parts.Values) |
175 | { | 200 | { |
176 | part.ScheduleTerseUpdate(); | 201 | part.ScheduleTerseUpdate(); |
177 | } | 202 | } |
@@ -182,7 +207,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
182 | /// </summary> | 207 | /// </summary> |
183 | public void SendGroupFullUpdate() | 208 | public void SendGroupFullUpdate() |
184 | { | 209 | { |
185 | foreach (AllNewSceneObjectPart2 part in this.m_parts.Values) | 210 | foreach (SceneObjectPart part in this.m_parts.Values) |
186 | { | 211 | { |
187 | part.SendFullUpdateToAllClients(); | 212 | part.SendFullUpdateToAllClients(); |
188 | } | 213 | } |
@@ -193,7 +218,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
193 | /// </summary> | 218 | /// </summary> |
194 | public void SendGroupTerseUpdate() | 219 | public void SendGroupTerseUpdate() |
195 | { | 220 | { |
196 | foreach (AllNewSceneObjectPart2 part in this.m_parts.Values) | 221 | foreach (SceneObjectPart part in this.m_parts.Values) |
197 | { | 222 | { |
198 | part.SendTerseUpdateToAllClients(); | 223 | part.SendTerseUpdateToAllClients(); |
199 | } | 224 | } |
@@ -203,7 +228,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
203 | /// | 228 | /// |
204 | /// </summary> | 229 | /// </summary> |
205 | /// <param name="objectGroup"></param> | 230 | /// <param name="objectGroup"></param> |
206 | public void LinkToGroup(AllNewSceneObjectGroup2 objectGroup) | 231 | public void LinkToGroup(SceneObjectGroup objectGroup) |
207 | { | 232 | { |
208 | 233 | ||
209 | } | 234 | } |
@@ -213,9 +238,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
213 | /// </summary> | 238 | /// </summary> |
214 | /// <param name="primID"></param> | 239 | /// <param name="primID"></param> |
215 | /// <returns></returns> | 240 | /// <returns></returns> |
216 | private AllNewSceneObjectPart2 GetChildPrim(LLUUID primID) | 241 | private SceneObjectPart GetChildPrim(LLUUID primID) |
217 | { | 242 | { |
218 | AllNewSceneObjectPart2 childPart = null; | 243 | SceneObjectPart childPart = null; |
219 | if (this.m_parts.ContainsKey(primID)) | 244 | if (this.m_parts.ContainsKey(primID)) |
220 | { | 245 | { |
221 | childPart = this.m_parts[primID]; | 246 | childPart = this.m_parts[primID]; |
@@ -228,9 +253,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
228 | /// </summary> | 253 | /// </summary> |
229 | /// <param name="localID"></param> | 254 | /// <param name="localID"></param> |
230 | /// <returns></returns> | 255 | /// <returns></returns> |
231 | private AllNewSceneObjectPart2 GetChildPrim(uint localID) | 256 | private SceneObjectPart GetChildPrim(uint localID) |
232 | { | 257 | { |
233 | foreach (AllNewSceneObjectPart2 part in this.m_parts.Values) | 258 | foreach (SceneObjectPart part in this.m_parts.Values) |
234 | { | 259 | { |
235 | if (part.LocalID == localID) | 260 | if (part.LocalID == localID) |
236 | { | 261 | { |
@@ -248,7 +273,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
248 | /// <returns></returns> | 273 | /// <returns></returns> |
249 | public bool HasChildPrim(LLUUID primID) | 274 | public bool HasChildPrim(LLUUID primID) |
250 | { | 275 | { |
251 | AllNewSceneObjectPart2 childPart = null; | 276 | SceneObjectPart childPart = null; |
252 | if (this.m_parts.ContainsKey(primID)) | 277 | if (this.m_parts.ContainsKey(primID)) |
253 | { | 278 | { |
254 | childPart = this.m_parts[primID]; | 279 | childPart = this.m_parts[primID]; |
@@ -265,7 +290,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
265 | /// <returns></returns> | 290 | /// <returns></returns> |
266 | public bool HasChildPrim(uint localID) | 291 | public bool HasChildPrim(uint localID) |
267 | { | 292 | { |
268 | foreach (AllNewSceneObjectPart2 part in this.m_parts.Values) | 293 | foreach (SceneObjectPart part in this.m_parts.Values) |
269 | { | 294 | { |
270 | if (part.LocalID == localID) | 295 | if (part.LocalID == localID) |
271 | { | 296 | { |
@@ -315,7 +340,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
315 | proper.ObjectData[0].GroupID = LLUUID.Zero; | 340 | proper.ObjectData[0].GroupID = LLUUID.Zero; |
316 | proper.ObjectData[0].InventorySerial = 0; | 341 | proper.ObjectData[0].InventorySerial = 0; |
317 | proper.ObjectData[0].LastOwnerID = this.m_rootPart.LastOwnerID; | 342 | proper.ObjectData[0].LastOwnerID = this.m_rootPart.LastOwnerID; |
318 | proper.ObjectData[0].ObjectID = this.m_uuid; | 343 | proper.ObjectData[0].ObjectID = this.UUID; |
319 | proper.ObjectData[0].OwnerID = this.m_rootPart.OwnerID; | 344 | proper.ObjectData[0].OwnerID = this.m_rootPart.OwnerID; |
320 | proper.ObjectData[0].TouchName = enc.GetBytes(this.m_rootPart.TouchName + "\0"); | 345 | proper.ObjectData[0].TouchName = enc.GetBytes(this.m_rootPart.TouchName + "\0"); |
321 | proper.ObjectData[0].TextureID = new byte[0]; | 346 | proper.ObjectData[0].TextureID = new byte[0]; |
@@ -334,11 +359,33 @@ namespace OpenSim.Region.Environment.Scenes | |||
334 | /// <summary> | 359 | /// <summary> |
335 | /// | 360 | /// |
336 | /// </summary> | 361 | /// </summary> |
362 | /// <param name="name"></param> | ||
363 | public void SetPartName(string name, uint localID) | ||
364 | { | ||
365 | SceneObjectPart part = this.GetChildPrim(localID); | ||
366 | if (part != null) | ||
367 | { | ||
368 | part.PartName = name; | ||
369 | } | ||
370 | } | ||
371 | |||
372 | public void SetPartDescription(string des, uint localID) | ||
373 | { | ||
374 | SceneObjectPart part = this.GetChildPrim(localID); | ||
375 | if (part != null) | ||
376 | { | ||
377 | part.Description = des; | ||
378 | } | ||
379 | } | ||
380 | |||
381 | /// <summary> | ||
382 | /// | ||
383 | /// </summary> | ||
337 | /// <param name="remoteClient"></param> | 384 | /// <param name="remoteClient"></param> |
338 | /// <param name="localID"></param> | 385 | /// <param name="localID"></param> |
339 | public void GetInventory(IClientAPI remoteClient, uint localID) | 386 | public void GetPartInventory(IClientAPI remoteClient, uint localID) |
340 | { | 387 | { |
341 | AllNewSceneObjectPart2 part = this.GetChildPrim(localID); | 388 | SceneObjectPart part = this.GetChildPrim(localID); |
342 | if (part != null) | 389 | if (part != null) |
343 | { | 390 | { |
344 | part.GetInventory(remoteClient, localID); | 391 | part.GetInventory(remoteClient, localID); |
@@ -354,7 +401,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
354 | /// <param name="data"></param> | 401 | /// <param name="data"></param> |
355 | public void UpdateExtraParam(uint localID, ushort type, bool inUse, byte[] data) | 402 | public void UpdateExtraParam(uint localID, ushort type, bool inUse, byte[] data) |
356 | { | 403 | { |
357 | AllNewSceneObjectPart2 part = this.GetChildPrim(localID); | 404 | SceneObjectPart part = this.GetChildPrim(localID); |
358 | if (part != null) | 405 | if (part != null) |
359 | { | 406 | { |
360 | part.UpdateExtraParam(type, inUse, data); | 407 | part.UpdateExtraParam(type, inUse, data); |
@@ -368,7 +415,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
368 | /// <param name="textureEntry"></param> | 415 | /// <param name="textureEntry"></param> |
369 | public void UpdateTextureEntry(uint localID, byte[] textureEntry) | 416 | public void UpdateTextureEntry(uint localID, byte[] textureEntry) |
370 | { | 417 | { |
371 | AllNewSceneObjectPart2 part = this.GetChildPrim(localID); | 418 | SceneObjectPart part = this.GetChildPrim(localID); |
372 | if (part != null) | 419 | if (part != null) |
373 | { | 420 | { |
374 | part.UpdateTextureEntry(textureEntry); | 421 | part.UpdateTextureEntry(textureEntry); |
@@ -382,7 +429,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
382 | /// <param name="shapeBlock"></param> | 429 | /// <param name="shapeBlock"></param> |
383 | public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock, uint localID) | 430 | public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock, uint localID) |
384 | { | 431 | { |
385 | AllNewSceneObjectPart2 part = this.GetChildPrim(localID); | 432 | SceneObjectPart part = this.GetChildPrim(localID); |
386 | if (part != null) | 433 | if (part != null) |
387 | { | 434 | { |
388 | part.UpdateShape(shapeBlock); | 435 | part.UpdateShape(shapeBlock); |
@@ -390,6 +437,20 @@ namespace OpenSim.Region.Environment.Scenes | |||
390 | } | 437 | } |
391 | #endregion | 438 | #endregion |
392 | 439 | ||
440 | /// <summary> | ||
441 | /// | ||
442 | /// </summary> | ||
443 | /// <param name="scale"></param> | ||
444 | /// <param name="localID"></param> | ||
445 | public void Resize(LLVector3 scale, uint localID) | ||
446 | { | ||
447 | SceneObjectPart part = this.GetChildPrim(localID); | ||
448 | if (part != null) | ||
449 | { | ||
450 | part.Resize(scale); | ||
451 | } | ||
452 | } | ||
453 | |||
393 | #region Position | 454 | #region Position |
394 | /// <summary> | 455 | /// <summary> |
395 | /// | 456 | /// |
@@ -407,7 +468,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
407 | /// <param name="localID"></param> | 468 | /// <param name="localID"></param> |
408 | public void UpdateSinglePosition(LLVector3 pos, uint localID) | 469 | public void UpdateSinglePosition(LLVector3 pos, uint localID) |
409 | { | 470 | { |
410 | AllNewSceneObjectPart2 part = this.GetChildPrim(localID); | 471 | SceneObjectPart part = this.GetChildPrim(localID); |
411 | if (part != null) | 472 | if (part != null) |
412 | { | 473 | { |
413 | if (part.UUID == this.m_rootPart.UUID) | 474 | if (part.UUID == this.m_rootPart.UUID) |
@@ -437,7 +498,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
437 | diff.Y = axDiff.y; | 498 | diff.Y = axDiff.y; |
438 | diff.Z = axDiff.z; | 499 | diff.Z = axDiff.z; |
439 | 500 | ||
440 | foreach (AllNewSceneObjectPart2 obPart in this.m_parts.Values) | 501 | foreach (SceneObjectPart obPart in this.m_parts.Values) |
441 | { | 502 | { |
442 | if (obPart.UUID != this.m_rootPart.UUID) | 503 | if (obPart.UUID != this.m_rootPart.UUID) |
443 | { | 504 | { |
@@ -479,7 +540,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
479 | /// <param name="localID"></param> | 540 | /// <param name="localID"></param> |
480 | public void UpdateSingleRotation(LLQuaternion rot, uint localID) | 541 | public void UpdateSingleRotation(LLQuaternion rot, uint localID) |
481 | { | 542 | { |
482 | AllNewSceneObjectPart2 part = this.GetChildPrim(localID); | 543 | SceneObjectPart part = this.GetChildPrim(localID); |
483 | if (part != null) | 544 | if (part != null) |
484 | { | 545 | { |
485 | if (part.UUID == this.m_rootPart.UUID) | 546 | if (part.UUID == this.m_rootPart.UUID) |
@@ -503,7 +564,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
503 | Axiom.Math.Quaternion axRot = new Quaternion(rot.W, rot.X, rot.Y, rot.Z); | 564 | Axiom.Math.Quaternion axRot = new Quaternion(rot.W, rot.X, rot.Y, rot.Z); |
504 | Axiom.Math.Quaternion oldParentRot = new Quaternion(this.m_rootPart.RotationOffset.W, this.m_rootPart.RotationOffset.X, this.m_rootPart.RotationOffset.Y, this.m_rootPart.RotationOffset.Z); | 565 | Axiom.Math.Quaternion oldParentRot = new Quaternion(this.m_rootPart.RotationOffset.W, this.m_rootPart.RotationOffset.X, this.m_rootPart.RotationOffset.Y, this.m_rootPart.RotationOffset.Z); |
505 | 566 | ||
506 | foreach (AllNewSceneObjectPart2 prim in this.m_parts.Values) | 567 | foreach (SceneObjectPart prim in this.m_parts.Values) |
507 | { | 568 | { |
508 | if (prim.UUID != this.m_rootPart.UUID) | 569 | if (prim.UUID != this.m_rootPart.UUID) |
509 | { | 570 | { |
@@ -524,7 +585,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
524 | /// | 585 | /// |
525 | /// </summary> | 586 | /// </summary> |
526 | /// <param name="part"></param> | 587 | /// <param name="part"></param> |
527 | private void SetPartAsRoot(AllNewSceneObjectPart2 part) | 588 | private void SetPartAsRoot(SceneObjectPart part) |
528 | { | 589 | { |
529 | this.m_rootPart = part; | 590 | this.m_rootPart = part; |
530 | //this.m_uuid= part.UUID; | 591 | //this.m_uuid= part.UUID; |
@@ -535,7 +596,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
535 | /// | 596 | /// |
536 | /// </summary> | 597 | /// </summary> |
537 | /// <param name="part"></param> | 598 | /// <param name="part"></param> |
538 | private void SetPartAsNonRoot(AllNewSceneObjectPart2 part) | 599 | private void SetPartAsNonRoot(SceneObjectPart part) |
539 | { | 600 | { |
540 | part.ParentID = this.m_rootPart.LocalID; | 601 | part.ParentID = this.m_rootPart.LocalID; |
541 | } | 602 | } |
@@ -554,7 +615,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
554 | /// </summary> | 615 | /// </summary> |
555 | /// <param name="remoteClient"></param> | 616 | /// <param name="remoteClient"></param> |
556 | /// <param name="part"></param> | 617 | /// <param name="part"></param> |
557 | internal void SendPartFullUpdate(IClientAPI remoteClient, AllNewSceneObjectPart2 part) | 618 | internal void SendPartFullUpdate(IClientAPI remoteClient, SceneObjectPart part) |
558 | { | 619 | { |
559 | if( m_rootPart == part ) | 620 | if( m_rootPart == part ) |
560 | { | 621 | { |
@@ -571,7 +632,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
571 | /// </summary> | 632 | /// </summary> |
572 | /// <param name="remoteClient"></param> | 633 | /// <param name="remoteClient"></param> |
573 | /// <param name="part"></param> | 634 | /// <param name="part"></param> |
574 | internal void SendPartTerseUpdate(IClientAPI remoteClient, AllNewSceneObjectPart2 part) | 635 | internal void SendPartTerseUpdate(IClientAPI remoteClient, SceneObjectPart part) |
575 | { | 636 | { |
576 | if (m_rootPart == part) | 637 | if (m_rootPart == part) |
577 | { | 638 | { |
diff --git a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index c91701a..d0730d7 100644 --- a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectPart2.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -10,7 +10,7 @@ using OpenSim.Framework.Types; | |||
10 | namespace OpenSim.Region.Environment.Scenes | 10 | namespace OpenSim.Region.Environment.Scenes |
11 | { | 11 | { |
12 | 12 | ||
13 | public class AllNewSceneObjectPart2 | 13 | public class SceneObjectPart |
14 | { | 14 | { |
15 | private const uint FULL_MASK_PERMISSIONS = 2147483647; | 15 | private const uint FULL_MASK_PERMISSIONS = 2147483647; |
16 | 16 | ||
@@ -29,7 +29,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
29 | 29 | ||
30 | protected byte[] m_particleSystem = new byte[0]; | 30 | protected byte[] m_particleSystem = new byte[0]; |
31 | 31 | ||
32 | protected AllNewSceneObjectGroup2 m_parentGroup; | 32 | protected SceneObjectGroup m_parentGroup; |
33 | 33 | ||
34 | /// <summary> | 34 | /// <summary> |
35 | /// Only used internally to schedule client updates | 35 | /// Only used internally to schedule client updates |
@@ -42,7 +42,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
42 | public LLUUID UUID | 42 | public LLUUID UUID |
43 | { | 43 | { |
44 | get { return m_uuid; } | 44 | get { return m_uuid; } |
45 | set { value = m_uuid; } | 45 | set { m_uuid = value ; } |
46 | } | 46 | } |
47 | 47 | ||
48 | protected uint m_localID; | 48 | protected uint m_localID; |
@@ -176,7 +176,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
176 | /// <summary> | 176 | /// <summary> |
177 | /// | 177 | /// |
178 | /// </summary> | 178 | /// </summary> |
179 | public AllNewSceneObjectPart2() | 179 | public SceneObjectPart() |
180 | { | 180 | { |
181 | 181 | ||
182 | } | 182 | } |
@@ -190,8 +190,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
190 | /// <param name="localID"></param> | 190 | /// <param name="localID"></param> |
191 | /// <param name="shape"></param> | 191 | /// <param name="shape"></param> |
192 | /// <param name="position"></param> | 192 | /// <param name="position"></param> |
193 | public AllNewSceneObjectPart2(ulong regionHandle, AllNewSceneObjectGroup2 parent, LLUUID ownerID, uint localID, PrimitiveBaseShape shape, LLVector3 groupPosition, LLVector3 offsetPosition) | 193 | public SceneObjectPart(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID, PrimitiveBaseShape shape, LLVector3 groupPosition, LLVector3 offsetPosition) |
194 | { | 194 | { |
195 | this.m_partName = "Primitive"; | ||
195 | this.m_regionHandle = regionHandle; | 196 | this.m_regionHandle = regionHandle; |
196 | this.m_parentGroup = parent; | 197 | this.m_parentGroup = parent; |
197 | 198 | ||
@@ -215,6 +216,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
215 | { | 216 | { |
216 | 217 | ||
217 | } | 218 | } |
219 | ScheduleFullUpdate(); | ||
218 | } | 220 | } |
219 | 221 | ||
220 | /// <summary> | 222 | /// <summary> |
@@ -226,7 +228,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
226 | /// <param name="localID"></param> | 228 | /// <param name="localID"></param> |
227 | /// <param name="shape"></param> | 229 | /// <param name="shape"></param> |
228 | /// <param name="position"></param> | 230 | /// <param name="position"></param> |
229 | public AllNewSceneObjectPart2(ulong regionHandle, AllNewSceneObjectGroup2 parent, int creationDate, LLUUID ownerID, LLUUID creatorID, LLUUID lastOwnerID, uint localID, PrimitiveBaseShape shape, LLVector3 position, LLQuaternion rotation, uint flags) | 231 | public SceneObjectPart(ulong regionHandle, SceneObjectGroup parent, int creationDate, LLUUID ownerID, LLUUID creatorID, LLUUID lastOwnerID, uint localID, PrimitiveBaseShape shape, LLVector3 position, LLQuaternion rotation, uint flags) |
230 | { | 232 | { |
231 | this.m_regionHandle = regionHandle; | 233 | this.m_regionHandle = regionHandle; |
232 | this.m_parentGroup = parent; | 234 | this.m_parentGroup = parent; |
@@ -250,9 +252,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
250 | /// | 252 | /// |
251 | /// </summary> | 253 | /// </summary> |
252 | /// <returns></returns> | 254 | /// <returns></returns> |
253 | public AllNewSceneObjectPart2 Copy(uint localID) | 255 | public SceneObjectPart Copy(uint localID) |
254 | { | 256 | { |
255 | AllNewSceneObjectPart2 dupe = (AllNewSceneObjectPart2)this.MemberwiseClone(); | 257 | SceneObjectPart dupe = (SceneObjectPart)this.MemberwiseClone(); |
256 | dupe.m_shape = m_shape.Copy(); | 258 | dupe.m_shape = m_shape.Copy(); |
257 | dupe.m_regionHandle = m_regionHandle; | 259 | dupe.m_regionHandle = m_regionHandle; |
258 | dupe.UUID = LLUUID.Random(); | 260 | dupe.UUID = LLUUID.Random(); |
@@ -343,6 +345,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
343 | this.m_shape.PathTaperY = shapeBlock.PathTaperY; | 345 | this.m_shape.PathTaperY = shapeBlock.PathTaperY; |
344 | this.m_shape.PathTwist = shapeBlock.PathTwist; | 346 | this.m_shape.PathTwist = shapeBlock.PathTwist; |
345 | this.m_shape.PathTwistBegin = shapeBlock.PathTwistBegin; | 347 | this.m_shape.PathTwistBegin = shapeBlock.PathTwistBegin; |
348 | ScheduleFullUpdate(); | ||
346 | } | 349 | } |
347 | #endregion | 350 | #endregion |
348 | 351 | ||
@@ -384,6 +387,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
384 | public void UpdateTextureEntry(byte[] textureEntry) | 387 | public void UpdateTextureEntry(byte[] textureEntry) |
385 | { | 388 | { |
386 | this.m_shape.TextureEntry = textureEntry; | 389 | this.m_shape.TextureEntry = textureEntry; |
390 | ScheduleFullUpdate(); | ||
387 | } | 391 | } |
388 | #endregion | 392 | #endregion |
389 | 393 | ||
@@ -403,6 +407,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
403 | { | 407 | { |
404 | LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); | 408 | LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z); |
405 | this.OffsetPosition = newPos; | 409 | this.OffsetPosition = newPos; |
410 | ScheduleTerseUpdate(); | ||
406 | } | 411 | } |
407 | #endregion | 412 | #endregion |
408 | 413 | ||
@@ -410,6 +415,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
410 | public void UpdateRotation(LLQuaternion rot) | 415 | public void UpdateRotation(LLQuaternion rot) |
411 | { | 416 | { |
412 | this.RotationOffset = new LLQuaternion(rot.X, rot.Y, rot.Z, rot.W); | 417 | this.RotationOffset = new LLQuaternion(rot.X, rot.Y, rot.Z, rot.W); |
418 | ScheduleTerseUpdate(); | ||
413 | } | 419 | } |
414 | #endregion | 420 | #endregion |
415 | 421 | ||
@@ -421,6 +427,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
421 | public void Resize(LLVector3 scale) | 427 | public void Resize(LLVector3 scale) |
422 | { | 428 | { |
423 | this.m_shape.Scale = scale; | 429 | this.m_shape.Scale = scale; |
430 | ScheduleFullUpdate(); | ||
424 | } | 431 | } |
425 | #endregion | 432 | #endregion |
426 | 433 | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scripting/Engines/CSharpEngine/Examples/ExportRegionToLSL.cs b/OpenSim/Region/Environment/Scenes/Scripting/Engines/CSharpEngine/Examples/ExportRegionToLSL.cs index d5566b7..97b1ada 100644 --- a/OpenSim/Region/Environment/Scenes/Scripting/Engines/CSharpEngine/Examples/ExportRegionToLSL.cs +++ b/OpenSim/Region/Environment/Scenes/Scripting/Engines/CSharpEngine/Examples/ExportRegionToLSL.cs | |||
@@ -26,7 +26,7 @@ namespace OpenSim.Region.Scripting.Examples | |||
26 | 26 | ||
27 | void ProcessConsoleMsg(string[] args) | 27 | void ProcessConsoleMsg(string[] args) |
28 | { | 28 | { |
29 | if (args[0].ToLower() == "lslexport") | 29 | /*if (args[0].ToLower() == "lslexport") |
30 | { | 30 | { |
31 | string sequence = ""; | 31 | string sequence = ""; |
32 | 32 | ||
@@ -48,12 +48,12 @@ namespace OpenSim.Region.Scripting.Examples | |||
48 | } | 48 | } |
49 | 49 | ||
50 | System.Console.WriteLine(sequence); | 50 | System.Console.WriteLine(sequence); |
51 | } | 51 | }*/ |
52 | } | 52 | } |
53 | 53 | ||
54 | string processPrimitiveToString(OpenSim.Region.Environment.Scenes.Primitive prim) | 54 | string processPrimitiveToString(OpenSim.Region.Environment.Scenes.Primitive prim) |
55 | { | 55 | { |
56 | string desc = prim.Description; | 56 | /*string desc = prim.Description; |
57 | string name = prim.Name; | 57 | string name = prim.Name; |
58 | LLVector3 pos = prim.Pos; | 58 | LLVector3 pos = prim.Pos; |
59 | LLQuaternion rot = new LLQuaternion(prim.Rotation.x, prim.Rotation.y, prim.Rotation.z, prim.Rotation.w); | 59 | LLQuaternion rot = new LLQuaternion(prim.Rotation.x, prim.Rotation.y, prim.Rotation.z, prim.Rotation.w); |
@@ -65,6 +65,8 @@ namespace OpenSim.Region.Scripting.Examples | |||
65 | setPrimParams += "[PRIM_SCALE, " + scale.ToString() + ", PRIM_POS, " + rootPos.ToString() + ", PRIM_ROTATION, " + rot.ToString() + "]\n"; | 65 | setPrimParams += "[PRIM_SCALE, " + scale.ToString() + ", PRIM_POS, " + rootPos.ToString() + ", PRIM_ROTATION, " + rot.ToString() + "]\n"; |
66 | 66 | ||
67 | return setPrimParams; | 67 | return setPrimParams; |
68 | */ | ||
69 | return ""; | ||
68 | } | 70 | } |
69 | } | 71 | } |
70 | } \ No newline at end of file | 72 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Environment/Scenes/Scripting/ScriptInterpretedAPI.cs b/OpenSim/Region/Environment/Scenes/Scripting/ScriptInterpretedAPI.cs index af8a29f..a5898b7 100644 --- a/OpenSim/Region/Environment/Scenes/Scripting/ScriptInterpretedAPI.cs +++ b/OpenSim/Region/Environment/Scenes/Scripting/ScriptInterpretedAPI.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Region.Scripting | |||
40 | /// <summary> | 40 | /// <summary> |
41 | /// The object our script is supposed to be in | 41 | /// The object our script is supposed to be in |
42 | /// </summary> | 42 | /// </summary> |
43 | public SceneObject Task | 43 | public SceneObjectGroup Task |
44 | { | 44 | { |
45 | get { return Scene.Objects[ObjectID]; } | 45 | get { return Scene.Objects[ObjectID]; } |
46 | } | 46 | } |
@@ -229,8 +229,8 @@ namespace OpenSim.Region.Scripting | |||
229 | 229 | ||
230 | public void osCreateLink(Key target, int parent) | 230 | public void osCreateLink(Key target, int parent) |
231 | { | 231 | { |
232 | if(Scene.Entities[target] is SceneObject) | 232 | if(Scene.Entities[target] is SceneObjectGroup) |
233 | Task.AddNewChildPrims((SceneObject)Scene.Entities[target]); | 233 | Task.LinkToGroup((SceneObjectGroup)Scene.Entities[target]); |
234 | 234 | ||
235 | return; | 235 | return; |
236 | } | 236 | } |
diff --git a/OpenSim/Region/Examples/SimpleApp/CpuCounterObject.cs b/OpenSim/Region/Examples/SimpleApp/CpuCounterObject.cs index 404653d..108fa98 100644 --- a/OpenSim/Region/Examples/SimpleApp/CpuCounterObject.cs +++ b/OpenSim/Region/Examples/SimpleApp/CpuCounterObject.cs | |||
@@ -9,12 +9,12 @@ using System.Diagnostics; | |||
9 | 9 | ||
10 | namespace SimpleApp | 10 | namespace SimpleApp |
11 | { | 11 | { |
12 | public class CpuCounterObject : SceneObject | 12 | public class CpuCounterObject : SceneObjectGroup |
13 | { | 13 | { |
14 | private PerformanceCounter m_counter; | 14 | private PerformanceCounter m_counter; |
15 | 15 | ||
16 | public CpuCounterObject(Scene world, EventManager eventManager, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape) | 16 | public CpuCounterObject(Scene world, ulong regionHandle, LLUUID ownerID, uint localID, LLVector3 pos, PrimitiveBaseShape shape) |
17 | : base(world, eventManager, ownerID, localID, pos, shape ) | 17 | : base(world, regionHandle, ownerID, localID, pos, shape ) |
18 | { | 18 | { |
19 | String objectName = "Processor"; | 19 | String objectName = "Processor"; |
20 | String counterName = "% Processor Time"; | 20 | String counterName = "% Processor Time"; |
@@ -27,7 +27,7 @@ namespace SimpleApp | |||
27 | { | 27 | { |
28 | float cpu = m_counter.NextValue() / 40f; | 28 | float cpu = m_counter.NextValue() / 40f; |
29 | LLVector3 size = new LLVector3(cpu, cpu, cpu); | 29 | LLVector3 size = new LLVector3(cpu, cpu, cpu); |
30 | rootPrimitive.ResizeGoup( size ); | 30 | //rootPrimitive.ResizeGoup( size ); |
31 | 31 | ||
32 | base.UpdateMovement(); | 32 | base.UpdateMovement(); |
33 | } | 33 | } |
diff --git a/OpenSim/Region/Examples/SimpleApp/FileSystemObject.cs b/OpenSim/Region/Examples/SimpleApp/FileSystemObject.cs index 83a76e3..920fea7 100644 --- a/OpenSim/Region/Examples/SimpleApp/FileSystemObject.cs +++ b/OpenSim/Region/Examples/SimpleApp/FileSystemObject.cs | |||
@@ -11,16 +11,16 @@ using Primitive=OpenSim.Region.Environment.Scenes.Primitive; | |||
11 | 11 | ||
12 | namespace SimpleApp | 12 | namespace SimpleApp |
13 | { | 13 | { |
14 | public class FileSystemObject : SceneObject | 14 | public class FileSystemObject : SceneObjectGroup |
15 | { | 15 | { |
16 | public FileSystemObject(Scene world, FileInfo fileInfo, LLVector3 pos) | 16 | public FileSystemObject(Scene world, FileInfo fileInfo, LLVector3 pos) |
17 | : base( world, world.EventManager, LLUUID.Zero, world.NextLocalId, pos, BoxShape.Default ) | 17 | : base( world, world.RegionInfo.RegionHandle, LLUUID.Zero, world.NextLocalId, pos, BoxShape.Default ) |
18 | { | 18 | { |
19 | 19 | ||
20 | 20 | ||
21 | float size = (float)Math.Pow((double)fileInfo.Length, (double) 1 / 3) / 5; | 21 | float size = (float)Math.Pow((double)fileInfo.Length, (double) 1 / 3) / 5; |
22 | rootPrimitive.ResizeGoup(new LLVector3(size, size, size)); | 22 | // rootPrimitive.ResizeGoup(new LLVector3(size, size, size)); |
23 | rootPrimitive.Text = fileInfo.Name; | 23 | // rootPrimitive.Text = fileInfo.Name; |
24 | } | 24 | } |
25 | 25 | ||
26 | public override void Update() | 26 | public override void Update() |
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs index db71578..84c86fd 100644 --- a/OpenSim/Region/Examples/SimpleApp/Program.cs +++ b/OpenSim/Region/Examples/SimpleApp/Program.cs | |||
@@ -69,7 +69,7 @@ namespace SimpleApp | |||
69 | shape.Scale = new LLVector3(0.5f, 0.5f, 0.5f); | 69 | shape.Scale = new LLVector3(0.5f, 0.5f, 0.5f); |
70 | LLVector3 pos = new LLVector3(138, 129, 27); | 70 | LLVector3 pos = new LLVector3(138, 129, 27); |
71 | 71 | ||
72 | SceneObject sceneObject = new CpuCounterObject(scene, scene.EventManager, LLUUID.Zero, scene.PrimIDAllocate(), pos, shape); | 72 | SceneObjectGroup sceneObject = new CpuCounterObject(scene, regionInfo.RegionHandle, LLUUID.Zero, scene.PrimIDAllocate(), pos, shape); |
73 | scene.AddEntity(sceneObject); | 73 | scene.AddEntity(sceneObject); |
74 | 74 | ||
75 | MyNpcCharacter m_character = new MyNpcCharacter( scene.EventManager ); | 75 | MyNpcCharacter m_character = new MyNpcCharacter( scene.EventManager ); |
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs index 06c9069..9c5e4bc 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs | |||
@@ -24,9 +24,9 @@ namespace OpenSim.DataStore.DB4oStorage | |||
24 | globalIDSearch = find; | 24 | globalIDSearch = find; |
25 | } | 25 | } |
26 | 26 | ||
27 | public bool Match(SceneObject obj) | 27 | public bool Match(SceneObjectGroup obj) |
28 | { | 28 | { |
29 | return obj.rootUUID == globalIDSearch; | 29 | return obj.UUID == globalIDSearch; |
30 | } | 30 | } |
31 | } | 31 | } |
32 | 32 | ||
@@ -43,7 +43,7 @@ namespace OpenSim.DataStore.DB4oStorage | |||
43 | return; | 43 | return; |
44 | } | 44 | } |
45 | 45 | ||
46 | public void StoreObject(SceneObject obj) | 46 | public void StoreObject(SceneObjectGroup obj) |
47 | { | 47 | { |
48 | db.Set(obj); | 48 | db.Set(obj); |
49 | } | 49 | } |
@@ -53,21 +53,21 @@ namespace OpenSim.DataStore.DB4oStorage | |||
53 | IObjectSet result = db.Query(new SceneObjectQuery(obj)); | 53 | IObjectSet result = db.Query(new SceneObjectQuery(obj)); |
54 | if (result.Count > 0) | 54 | if (result.Count > 0) |
55 | { | 55 | { |
56 | SceneObject item = (SceneObject)result.Next(); | 56 | SceneObjectGroup item = (SceneObjectGroup)result.Next(); |
57 | db.Delete(item); | 57 | db.Delete(item); |
58 | } | 58 | } |
59 | } | 59 | } |
60 | 60 | ||
61 | public List<SceneObject> LoadObjects() | 61 | public List<SceneObjectGroup> LoadObjects() |
62 | { | 62 | { |
63 | IObjectSet result = db.Get(typeof(SceneObject)); | 63 | IObjectSet result = db.Get(typeof(SceneObjectGroup)); |
64 | List<SceneObject> retvals = new List<SceneObject>(); | 64 | List<SceneObjectGroup> retvals = new List<SceneObjectGroup>(); |
65 | 65 | ||
66 | MainLog.Instance.Verbose("DATASTORE", "DB4O - LoadObjects found " + result.Count.ToString() + " objects"); | 66 | MainLog.Instance.Verbose("DATASTORE", "DB4O - LoadObjects found " + result.Count.ToString() + " objects"); |
67 | 67 | ||
68 | foreach (Object obj in result) | 68 | foreach (Object obj in result) |
69 | { | 69 | { |
70 | retvals.Add((SceneObject)obj); | 70 | retvals.Add((SceneObjectGroup)obj); |
71 | } | 71 | } |
72 | 72 | ||
73 | return retvals; | 73 | return retvals; |
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs index fc003e8..643508e 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs | |||
@@ -18,7 +18,7 @@ namespace OpenSim.DataStore.NullStorage | |||
18 | return; | 18 | return; |
19 | } | 19 | } |
20 | 20 | ||
21 | public void StoreObject(SceneObject obj) | 21 | public void StoreObject(SceneObjectGroup obj) |
22 | { | 22 | { |
23 | 23 | ||
24 | } | 24 | } |
@@ -28,9 +28,9 @@ namespace OpenSim.DataStore.NullStorage | |||
28 | 28 | ||
29 | } | 29 | } |
30 | 30 | ||
31 | public List<SceneObject> LoadObjects() | 31 | public List<SceneObjectGroup> LoadObjects() |
32 | { | 32 | { |
33 | return new List<SceneObject>(); | 33 | return new List<SceneObjectGroup>(); |
34 | } | 34 | } |
35 | 35 | ||
36 | public void StoreTerrain(double[,] ter) | 36 | public void StoreTerrain(double[,] ter) |