aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorDan Lake2011-11-10 17:21:37 -0800
committerDan Lake2011-11-10 17:21:37 -0800
commit96c59156a729138d65d6e81ac5cc4b3814a2fe4e (patch)
tree8e058fedab46109f2295ffd50ea46dee79d3af18 /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
parentMerge branch 'master' of git://opensimulator.org/git/opensim (diff)
downloadopensim-SC_OLD-96c59156a729138d65d6e81ac5cc4b3814a2fe4e.zip
opensim-SC_OLD-96c59156a729138d65d6e81ac5cc4b3814a2fe4e.tar.gz
opensim-SC_OLD-96c59156a729138d65d6e81ac5cc4b3814a2fe4e.tar.bz2
opensim-SC_OLD-96c59156a729138d65d6e81ac5cc4b3814a2fe4e.tar.xz
In SOP, replaced many references to private members with the public properties
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs476
1 files changed, 233 insertions, 243 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index ad60604..4e1383c 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -257,7 +257,6 @@ namespace OpenSim.Region.Framework.Scenes
257 private string m_touchName = String.Empty; 257 private string m_touchName = String.Empty;
258 private readonly Stack<UndoState> m_undo = new Stack<UndoState>(5); 258 private readonly Stack<UndoState> m_undo = new Stack<UndoState>(5);
259 private readonly Stack<UndoState> m_redo = new Stack<UndoState>(5); 259 private readonly Stack<UndoState> m_redo = new Stack<UndoState>(5);
260 private UUID _creatorID;
261 260
262 private bool m_passTouches; 261 private bool m_passTouches;
263 262
@@ -343,19 +342,14 @@ namespace OpenSim.Region.Framework.Scenes
343 m_name = "Primitive"; 342 m_name = "Primitive";
344 343
345 Rezzed = DateTime.UtcNow; 344 Rezzed = DateTime.UtcNow;
346 _creationDate = (int)Utils.DateTimeToUnixTime(Rezzed); 345 CreationDate = (int)Utils.DateTimeToUnixTime(Rezzed);
347 _ownerID = ownerID; 346 LastOwnerID = CreatorID = OwnerID = ownerID;
348 _creatorID = _ownerID;
349 _lastOwnerID = UUID.Zero;
350 UUID = UUID.Random(); 347 UUID = UUID.Random();
351 Shape = shape; 348 Shape = shape;
352 // Todo: Add More Object Parameter from above! 349 OwnershipCost = 0;
353 _ownershipCost = 0; 350 ObjectSaleType = 0;
354 _objectSaleType = 0; 351 SalePrice = 0;
355 _salePrice = 0; 352 Category = 0;
356 _category = 0;
357 _lastOwnerID = _creatorID;
358 // End Todo: ///
359 GroupPosition = groupPosition; 353 GroupPosition = groupPosition;
360 OffsetPosition = offsetPosition; 354 OffsetPosition = offsetPosition;
361 RotationOffset = rotationOffset; 355 RotationOffset = rotationOffset;
@@ -400,20 +394,15 @@ namespace OpenSim.Region.Framework.Scenes
400 private DateTime m_expires; 394 private DateTime m_expires;
401 private DateTime m_rezzed; 395 private DateTime m_rezzed;
402 private bool m_createSelected = false; 396 private bool m_createSelected = false;
403 private string m_creatorData = string.Empty;
404 397
398 private UUID _creatorID;
405 public UUID CreatorID 399 public UUID CreatorID
406 { 400 {
407 get 401 get { return _creatorID; }
408 { 402 set { _creatorID = value; }
409 return _creatorID;
410 }
411 set
412 {
413 _creatorID = value;
414 }
415 } 403 }
416 404
405 private string m_creatorData = string.Empty;
417 /// <summary> 406 /// <summary>
418 /// Data about the creator in the form profile_url;name 407 /// Data about the creator in the form profile_url;name
419 /// </summary> 408 /// </summary>
@@ -432,16 +421,16 @@ namespace OpenSim.Region.Framework.Scenes
432 { 421 {
433 get 422 get
434 { 423 {
435 if (m_creatorData != null && m_creatorData != string.Empty) 424 if (CreatorData != null && CreatorData != string.Empty)
436 return _creatorID.ToString() + ';' + m_creatorData; 425 return CreatorID.ToString() + ';' + CreatorData;
437 else 426 else
438 return _creatorID.ToString(); 427 return CreatorID.ToString();
439 } 428 }
440 set 429 set
441 { 430 {
442 if ((value == null) || (value != null && value == string.Empty)) 431 if ((value == null) || (value != null && value == string.Empty))
443 { 432 {
444 m_creatorData = string.Empty; 433 CreatorData = string.Empty;
445 return; 434 return;
446 } 435 }
447 436
@@ -449,7 +438,7 @@ namespace OpenSim.Region.Framework.Scenes
449 { 438 {
450 UUID uuid = UUID.Zero; 439 UUID uuid = UUID.Zero;
451 UUID.TryParse(value, out uuid); 440 UUID.TryParse(value, out uuid);
452 _creatorID = uuid; 441 CreatorID = uuid;
453 } 442 }
454 else // <uuid>[;<endpoint>[;name]] 443 else // <uuid>[;<endpoint>[;name]]
455 { 444 {
@@ -459,14 +448,14 @@ namespace OpenSim.Region.Framework.Scenes
459 { 448 {
460 UUID uuid = UUID.Zero; 449 UUID uuid = UUID.Zero;
461 UUID.TryParse(parts[0], out uuid); 450 UUID.TryParse(parts[0], out uuid);
462 _creatorID = uuid; 451 CreatorID = uuid;
463 } 452 }
464 if (parts.Length >= 2) 453 if (parts.Length >= 2)
465 m_creatorData = parts[1]; 454 CreatorData = parts[1];
466 if (parts.Length >= 3) 455 if (parts.Length >= 3)
467 name = parts[2]; 456 name = parts[2];
468 457
469 m_creatorData += ';' + name; 458 CreatorData += ';' + name;
470 459
471 } 460 }
472 } 461 }
@@ -684,14 +673,14 @@ namespace OpenSim.Region.Framework.Scenes
684 { 673 {
685 // If this is a linkset, we don't want the physics engine mucking up our group position here. 674 // If this is a linkset, we don't want the physics engine mucking up our group position here.
686 PhysicsActor actor = PhysActor; 675 PhysicsActor actor = PhysActor;
687 if (actor != null && _parentID == 0) 676 if (actor != null && ParentID == 0)
688 { 677 {
689 m_groupPosition = actor.Position; 678 m_groupPosition = actor.Position;
690 } 679 }
691 680
692 if (m_parentGroup.IsAttachment) 681 if (ParentGroup.IsAttachment)
693 { 682 {
694 ScenePresence sp = m_parentGroup.Scene.GetScenePresence(ParentGroup.AttachedAvatar); 683 ScenePresence sp = ParentGroup.Scene.GetScenePresence(ParentGroup.AttachedAvatar);
695 if (sp != null) 684 if (sp != null)
696 return sp.AbsolutePosition; 685 return sp.AbsolutePosition;
697 } 686 }
@@ -708,7 +697,7 @@ namespace OpenSim.Region.Framework.Scenes
708 try 697 try
709 { 698 {
710 // Root prim actually goes at Position 699 // Root prim actually goes at Position
711 if (_parentID == 0) 700 if (ParentID == 0)
712 { 701 {
713 actor.Position = value; 702 actor.Position = value;
714 } 703 }
@@ -720,7 +709,7 @@ namespace OpenSim.Region.Framework.Scenes
720 } 709 }
721 710
722 // Tell the physics engines that this prim changed. 711 // Tell the physics engines that this prim changed.
723 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor); 712 ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
724 } 713 }
725 catch (Exception e) 714 catch (Exception e)
726 { 715 {
@@ -729,10 +718,10 @@ namespace OpenSim.Region.Framework.Scenes
729 } 718 }
730 719
731 // TODO if we decide to do sitting in a more SL compatible way (multiple avatars per prim), this has to be fixed, too 720 // TODO if we decide to do sitting in a more SL compatible way (multiple avatars per prim), this has to be fixed, too
732 if (m_sitTargetAvatar != UUID.Zero) 721 if (SitTargetAvatar != UUID.Zero)
733 { 722 {
734 ScenePresence avatar; 723 ScenePresence avatar;
735 if (m_parentGroup.Scene.TryGetScenePresence(m_sitTargetAvatar, out avatar)) 724 if (ParentGroup.Scene.TryGetScenePresence(SitTargetAvatar, out avatar))
736 { 725 {
737 avatar.ParentPosition = GetWorldPosition(); 726 avatar.ParentPosition = GetWorldPosition();
738 } 727 }
@@ -751,14 +740,14 @@ namespace OpenSim.Region.Framework.Scenes
751 if (ParentGroup != null && !ParentGroup.IsDeleted) 740 if (ParentGroup != null && !ParentGroup.IsDeleted)
752 { 741 {
753 PhysicsActor actor = PhysActor; 742 PhysicsActor actor = PhysActor;
754 if (_parentID != 0 && actor != null) 743 if (ParentID != 0 && actor != null)
755 { 744 {
756 actor.Position = GetWorldPosition(); 745 actor.Position = GetWorldPosition();
757 actor.Orientation = GetWorldRotation(); 746 actor.Orientation = GetWorldRotation();
758 747
759 // Tell the physics engines that this prim changed. 748 // Tell the physics engines that this prim changed.
760 if (m_parentGroup.Scene != null) 749 if (ParentGroup.Scene != null)
761 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor); 750 ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
762 } 751 }
763 } 752 }
764 } 753 }
@@ -770,7 +759,7 @@ namespace OpenSim.Region.Framework.Scenes
770 { 759 {
771 if (IsRoot) 760 if (IsRoot)
772 { 761 {
773 if (m_parentGroup.IsAttachment) 762 if (ParentGroup.IsAttachment)
774 return AttachedPos; 763 return AttachedPos;
775 else 764 else
776 return AbsolutePosition; 765 return AbsolutePosition;
@@ -788,7 +777,7 @@ namespace OpenSim.Region.Framework.Scenes
788 { 777 {
789 // We don't want the physics engine mucking up the rotations in a linkset 778 // We don't want the physics engine mucking up the rotations in a linkset
790 PhysicsActor actor = PhysActor; 779 PhysicsActor actor = PhysActor;
791 if (_parentID == 0 && (Shape.PCode != 9 || Shape.State == 0) && actor != null) 780 if (ParentID == 0 && (Shape.PCode != 9 || Shape.State == 0) && actor != null)
792 { 781 {
793 if (actor.Orientation.X != 0f || actor.Orientation.Y != 0f 782 if (actor.Orientation.X != 0f || actor.Orientation.Y != 0f
794 || actor.Orientation.Z != 0f || actor.Orientation.W != 0f) 783 || actor.Orientation.Z != 0f || actor.Orientation.W != 0f)
@@ -818,7 +807,7 @@ namespace OpenSim.Region.Framework.Scenes
818 try 807 try
819 { 808 {
820 // Root prim gets value directly 809 // Root prim gets value directly
821 if (_parentID == 0) 810 if (ParentID == 0)
822 { 811 {
823 actor.Orientation = value; 812 actor.Orientation = value;
824 //m_log.Info("[PART]: RO1:" + actor.Orientation.ToString()); 813 //m_log.Info("[PART]: RO1:" + actor.Orientation.ToString());
@@ -831,8 +820,8 @@ namespace OpenSim.Region.Framework.Scenes
831 //m_log.Info("[PART]: RO2:" + actor.Orientation.ToString()); 820 //m_log.Info("[PART]: RO2:" + actor.Orientation.ToString());
832 } 821 }
833 822
834 if (m_parentGroup != null) 823 if (ParentGroup != null)
835 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor); 824 ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
836 //} 825 //}
837 } 826 }
838 catch (Exception ex) 827 catch (Exception ex)
@@ -877,7 +866,7 @@ namespace OpenSim.Region.Framework.Scenes
877 if (actor.IsPhysical) 866 if (actor.IsPhysical)
878 { 867 {
879 actor.Velocity = value; 868 actor.Velocity = value;
880 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor); 869 ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
881 } 870 }
882 } 871 }
883 } 872 }
@@ -1012,9 +1001,9 @@ namespace OpenSim.Region.Framework.Scenes
1012 PhysicsActor actor = PhysActor; 1001 PhysicsActor actor = PhysActor;
1013 if (actor != null) 1002 if (actor != null)
1014 { 1003 {
1015 if (m_parentGroup.Scene != null) 1004 if (ParentGroup.Scene != null)
1016 { 1005 {
1017 if (m_parentGroup.Scene.PhysicsScene != null) 1006 if (ParentGroup.Scene.PhysicsScene != null)
1018 { 1007 {
1019 actor.Size = m_shape.Scale; 1008 actor.Size = m_shape.Scale;
1020 1009
@@ -1076,7 +1065,7 @@ namespace OpenSim.Region.Framework.Scenes
1076 { 1065 {
1077 get 1066 get
1078 { 1067 {
1079 if (m_parentGroup.IsAttachment) 1068 if (ParentGroup.IsAttachment)
1080 return GroupPosition; 1069 return GroupPosition;
1081 1070
1082 return m_offsetPosition + m_groupPosition; 1071 return m_offsetPosition + m_groupPosition;
@@ -1086,6 +1075,7 @@ namespace OpenSim.Region.Framework.Scenes
1086 public SceneObjectGroup ParentGroup 1075 public SceneObjectGroup ParentGroup
1087 { 1076 {
1088 get { return m_parentGroup; } 1077 get { return m_parentGroup; }
1078 private set { m_parentGroup = value; }
1089 } 1079 }
1090 1080
1091 public scriptEvents ScriptEvents 1081 public scriptEvents ScriptEvents
@@ -1388,7 +1378,7 @@ namespace OpenSim.Region.Framework.Scenes
1388 /// </summary> 1378 /// </summary>
1389 public void AddFullUpdateToAllAvatars() 1379 public void AddFullUpdateToAllAvatars()
1390 { 1380 {
1391 m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) 1381 ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
1392 { 1382 {
1393 AddFullUpdateToAvatar(avatar); 1383 AddFullUpdateToAvatar(avatar);
1394 }); 1384 });
@@ -1415,7 +1405,7 @@ namespace OpenSim.Region.Framework.Scenes
1415 /// Terse updates 1405 /// Terse updates
1416 public void AddTerseUpdateToAllAvatars() 1406 public void AddTerseUpdateToAllAvatars()
1417 { 1407 {
1418 m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) 1408 ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
1419 { 1409 {
1420 AddTerseUpdateToAvatar(avatar); 1410 AddTerseUpdateToAvatar(avatar);
1421 }); 1411 });
@@ -1453,7 +1443,7 @@ namespace OpenSim.Region.Framework.Scenes
1453 if (volume < 0) 1443 if (volume < 0)
1454 volume = 0; 1444 volume = 0;
1455 1445
1456 m_parentGroup.Scene.ForEachRootClient(delegate(IClientAPI client) 1446 ParentGroup.Scene.ForEachRootClient(delegate(IClientAPI client)
1457 { 1447 {
1458 client.SendAttachedSoundGainChange(UUID, (float)volume); 1448 client.SendAttachedSoundGainChange(UUID, (float)volume);
1459 }); 1449 });
@@ -1479,9 +1469,9 @@ namespace OpenSim.Region.Framework.Scenes
1479 impulse = newimpulse; 1469 impulse = newimpulse;
1480 } 1470 }
1481 1471
1482 if (m_parentGroup != null) 1472 if (ParentGroup != null)
1483 { 1473 {
1484 m_parentGroup.applyImpulse(impulse); 1474 ParentGroup.applyImpulse(impulse);
1485 } 1475 }
1486 } 1476 }
1487 1477
@@ -1505,7 +1495,7 @@ namespace OpenSim.Region.Framework.Scenes
1505 impulse = newimpulse; 1495 impulse = newimpulse;
1506 } 1496 }
1507 1497
1508 m_parentGroup.applyAngularImpulse(impulse); 1498 ParentGroup.applyAngularImpulse(impulse);
1509 } 1499 }
1510 1500
1511 /// <summary> 1501 /// <summary>
@@ -1528,7 +1518,7 @@ namespace OpenSim.Region.Framework.Scenes
1528 impulse = newimpulse; 1518 impulse = newimpulse;
1529 } 1519 }
1530 1520
1531 m_parentGroup.setAngularImpulse(impulse); 1521 ParentGroup.setAngularImpulse(impulse);
1532 } 1522 }
1533 1523
1534 /// <summary> 1524 /// <summary>
@@ -1560,11 +1550,11 @@ namespace OpenSim.Region.Framework.Scenes
1560 1550
1561 // The only time the physics scene shouldn't know about the prim is if it's phantom or an attachment, which is phantom by definition 1551 // The only time the physics scene shouldn't know about the prim is if it's phantom or an attachment, which is phantom by definition
1562 // or flexible 1552 // or flexible
1563 if (!isPhantom && !m_parentGroup.IsAttachment && !(Shape.PathCurve == (byte) Extrusion.Flexible)) 1553 if (!isPhantom && !ParentGroup.IsAttachment && !(Shape.PathCurve == (byte)Extrusion.Flexible))
1564 { 1554 {
1565 try 1555 try
1566 { 1556 {
1567 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( 1557 PhysActor = ParentGroup.Scene.PhysicsScene.AddPrimShape(
1568 string.Format("{0}/{1}", Name, UUID), 1558 string.Format("{0}/{1}", Name, UUID),
1569 Shape, 1559 Shape,
1570 AbsolutePosition, 1560 AbsolutePosition,
@@ -1631,8 +1621,8 @@ namespace OpenSim.Region.Framework.Scenes
1631 if (!userExposed) 1621 if (!userExposed)
1632 dupe.PhysActor = null; 1622 dupe.PhysActor = null;
1633 1623
1634 dupe._ownerID = AgentID; 1624 dupe.OwnerID = AgentID;
1635 dupe._groupID = GroupID; 1625 dupe.GroupID = GroupID;
1636 dupe.GroupPosition = GroupPosition; 1626 dupe.GroupPosition = GroupPosition;
1637 dupe.OffsetPosition = OffsetPosition; 1627 dupe.OffsetPosition = OffsetPosition;
1638 dupe.RotationOffset = RotationOffset; 1628 dupe.RotationOffset = RotationOffset;
@@ -1641,10 +1631,10 @@ namespace OpenSim.Region.Framework.Scenes
1641 dupe.AngularVelocity = new Vector3(0, 0, 0); 1631 dupe.AngularVelocity = new Vector3(0, 0, 0);
1642 dupe.Flags = Flags; 1632 dupe.Flags = Flags;
1643 1633
1644 dupe._ownershipCost = _ownershipCost; 1634 dupe.OwnershipCost = OwnershipCost;
1645 dupe._objectSaleType = _objectSaleType; 1635 dupe.ObjectSaleType = ObjectSaleType;
1646 dupe._salePrice = _salePrice; 1636 dupe.SalePrice = SalePrice;
1647 dupe._category = _category; 1637 dupe.Category = Category;
1648 dupe.m_rezzed = m_rezzed; 1638 dupe.m_rezzed = m_rezzed;
1649 1639
1650 dupe.m_inventory = new SceneObjectPartInventory(dupe); 1640 dupe.m_inventory = new SceneObjectPartInventory(dupe);
@@ -1663,7 +1653,7 @@ namespace OpenSim.Region.Framework.Scenes
1663 // Move afterwards ResetIDs as it clears the localID 1653 // Move afterwards ResetIDs as it clears the localID
1664 dupe.LocalId = localID; 1654 dupe.LocalId = localID;
1665 // This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated. 1655 // This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated.
1666 dupe._lastOwnerID = OwnerID; 1656 dupe.LastOwnerID = OwnerID;
1667 1657
1668 byte[] extraP = new byte[Shape.ExtraParams.Length]; 1658 byte[] extraP = new byte[Shape.ExtraParams.Length];
1669 Array.Copy(Shape.ExtraParams, extraP, extraP.Length); 1659 Array.Copy(Shape.ExtraParams, extraP, extraP.Length);
@@ -1750,7 +1740,7 @@ namespace OpenSim.Region.Framework.Scenes
1750 } 1740 }
1751 } 1741 }
1752 1742
1753 SceneObjectPart trackedBody = m_parentGroup.Scene.GetSceneObjectPart(trackedBodyName); // FIXME: causes a sequential lookup 1743 SceneObjectPart trackedBody = ParentGroup.Scene.GetSceneObjectPart(trackedBodyName); // FIXME: causes a sequential lookup
1754 Quaternion localRotation = Quaternion.Identity; 1744 Quaternion localRotation = Quaternion.Identity;
1755 if (trackedBody != null) 1745 if (trackedBody != null)
1756 { 1746 {
@@ -1763,7 +1753,7 @@ namespace OpenSim.Region.Framework.Scenes
1763 1753
1764 PhysicsJoint joint; 1754 PhysicsJoint joint;
1765 1755
1766 joint = m_parentGroup.Scene.PhysicsScene.RequestJointCreation(Name, jointType, 1756 joint = ParentGroup.Scene.PhysicsScene.RequestJointCreation(Name, jointType,
1767 AbsolutePosition, 1757 AbsolutePosition,
1768 this.RotationOffset, 1758 this.RotationOffset,
1769 Description, 1759 Description,
@@ -1788,7 +1778,7 @@ namespace OpenSim.Region.Framework.Scenes
1788 else 1778 else
1789 { 1779 {
1790 // here we turn off the joint object, so remove the joint from the physics scene 1780 // here we turn off the joint object, so remove the joint from the physics scene
1791 m_parentGroup.Scene.PhysicsScene.RequestJointDeletion(Name); // FIXME: what if the name changed? 1781 ParentGroup.Scene.PhysicsScene.RequestJointDeletion(Name); // FIXME: what if the name changed?
1792 1782
1793 // make sure client isn't interpolating the joint proxy object 1783 // make sure client isn't interpolating the joint proxy object
1794 Velocity = Vector3.Zero; 1784 Velocity = Vector3.Zero;
@@ -1830,7 +1820,7 @@ namespace OpenSim.Region.Framework.Scenes
1830 if (ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints && (!isNew)) 1820 if (ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints && (!isNew))
1831 { 1821 {
1832 // destroy all joints connected to this now deactivated body 1822 // destroy all joints connected to this now deactivated body
1833 m_parentGroup.Scene.PhysicsScene.RemoveAllJointsConnectedToActorThreadLocked(PhysActor); 1823 ParentGroup.Scene.PhysicsScene.RemoveAllJointsConnectedToActorThreadLocked(PhysActor);
1834 } 1824 }
1835 1825
1836 // stop client-side interpolation of all joint proxy objects that have just been deleted 1826 // stop client-side interpolation of all joint proxy objects that have just been deleted
@@ -1864,7 +1854,7 @@ namespace OpenSim.Region.Framework.Scenes
1864 1854
1865 PhysActor.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate; 1855 PhysActor.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate;
1866 PhysActor.OnOutOfBounds += PhysicsOutOfBounds; 1856 PhysActor.OnOutOfBounds += PhysicsOutOfBounds;
1867 if (_parentID != 0 && _parentID != LocalId) 1857 if (ParentID != 0 && ParentID != LocalId)
1868 { 1858 {
1869 if (ParentGroup.RootPart.PhysActor != null) 1859 if (ParentGroup.RootPart.PhysActor != null)
1870 { 1860 {
@@ -1880,7 +1870,7 @@ namespace OpenSim.Region.Framework.Scenes
1880 if (Shape.SculptEntry) 1870 if (Shape.SculptEntry)
1881 CheckSculptAndLoad(); 1871 CheckSculptAndLoad();
1882 else 1872 else
1883 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); 1873 ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
1884 } 1874 }
1885 } 1875 }
1886 } 1876 }
@@ -1903,58 +1893,58 @@ namespace OpenSim.Region.Framework.Scenes
1903 1893
1904 public bool GetDieAtEdge() 1894 public bool GetDieAtEdge()
1905 { 1895 {
1906 if (m_parentGroup.IsDeleted) 1896 if (ParentGroup.IsDeleted)
1907 return false; 1897 return false;
1908 1898
1909 return m_parentGroup.RootPart.DIE_AT_EDGE; 1899 return ParentGroup.RootPart.DIE_AT_EDGE;
1910 } 1900 }
1911 1901
1912 public bool GetReturnAtEdge() 1902 public bool GetReturnAtEdge()
1913 { 1903 {
1914 if (m_parentGroup.IsDeleted) 1904 if (ParentGroup.IsDeleted)
1915 return false; 1905 return false;
1916 1906
1917 return m_parentGroup.RootPart.RETURN_AT_EDGE; 1907 return ParentGroup.RootPart.RETURN_AT_EDGE;
1918 } 1908 }
1919 1909
1920 public void SetReturnAtEdge(bool p) 1910 public void SetReturnAtEdge(bool p)
1921 { 1911 {
1922 if (m_parentGroup.IsDeleted) 1912 if (ParentGroup.IsDeleted)
1923 return; 1913 return;
1924 1914
1925 m_parentGroup.RootPart.RETURN_AT_EDGE = p; 1915 ParentGroup.RootPart.RETURN_AT_EDGE = p;
1926 } 1916 }
1927 1917
1928 public bool GetBlockGrab() 1918 public bool GetBlockGrab()
1929 { 1919 {
1930 if (m_parentGroup.IsDeleted) 1920 if (ParentGroup.IsDeleted)
1931 return false; 1921 return false;
1932 1922
1933 return m_parentGroup.RootPart.BlockGrab; 1923 return ParentGroup.RootPart.BlockGrab;
1934 } 1924 }
1935 1925
1936 public void SetBlockGrab(bool p) 1926 public void SetBlockGrab(bool p)
1937 { 1927 {
1938 if (m_parentGroup.IsDeleted) 1928 if (ParentGroup.IsDeleted)
1939 return; 1929 return;
1940 1930
1941 m_parentGroup.RootPart.BlockGrab = p; 1931 ParentGroup.RootPart.BlockGrab = p;
1942 } 1932 }
1943 1933
1944 public void SetStatusSandbox(bool p) 1934 public void SetStatusSandbox(bool p)
1945 { 1935 {
1946 if (m_parentGroup.IsDeleted) 1936 if (ParentGroup.IsDeleted)
1947 return; 1937 return;
1948 StatusSandboxPos = m_parentGroup.RootPart.AbsolutePosition; 1938 StatusSandboxPos = ParentGroup.RootPart.AbsolutePosition;
1949 m_parentGroup.RootPart.StatusSandbox = p; 1939 ParentGroup.RootPart.StatusSandbox = p;
1950 } 1940 }
1951 1941
1952 public bool GetStatusSandbox() 1942 public bool GetStatusSandbox()
1953 { 1943 {
1954 if (m_parentGroup.IsDeleted) 1944 if (ParentGroup.IsDeleted)
1955 return false; 1945 return false;
1956 1946
1957 return m_parentGroup.RootPart.StatusSandbox; 1947 return ParentGroup.RootPart.StatusSandbox;
1958 } 1948 }
1959 1949
1960 public int GetAxisRotation(int axis) 1950 public int GetAxisRotation(int axis)
@@ -2064,7 +2054,7 @@ namespace OpenSim.Region.Framework.Scenes
2064 { 2054 {
2065 if (tau > 0) 2055 if (tau > 0)
2066 { 2056 {
2067 m_parentGroup.moveToTarget(target, tau); 2057 ParentGroup.moveToTarget(target, tau);
2068 } 2058 }
2069 else 2059 else
2070 { 2060 {
@@ -2080,12 +2070,12 @@ namespace OpenSim.Region.Framework.Scenes
2080 /// <param name="tau">Number of seconds over which to reach target</param> 2070 /// <param name="tau">Number of seconds over which to reach target</param>
2081 public void SetHoverHeight(float height, PIDHoverType hoverType, float tau) 2071 public void SetHoverHeight(float height, PIDHoverType hoverType, float tau)
2082 { 2072 {
2083 m_parentGroup.SetHoverHeight(height, hoverType, tau); 2073 ParentGroup.SetHoverHeight(height, hoverType, tau);
2084 } 2074 }
2085 2075
2086 public void StopHover() 2076 public void StopHover()
2087 { 2077 {
2088 m_parentGroup.SetHoverHeight(0f, PIDHoverType.Ground, 0f); 2078 ParentGroup.SetHoverHeight(0f, PIDHoverType.Ground, 0f);
2089 } 2079 }
2090 2080
2091 public virtual void OnGrab(Vector3 offsetPos, IClientAPI remoteClient) 2081 public virtual void OnGrab(Vector3 offsetPos, IClientAPI remoteClient)
@@ -2136,7 +2126,7 @@ namespace OpenSim.Region.Framework.Scenes
2136 m_lastColliders.Remove(localID); 2126 m_lastColliders.Remove(localID);
2137 } 2127 }
2138 2128
2139 if (m_parentGroup.IsDeleted) 2129 if (ParentGroup.IsDeleted)
2140 return; 2130 return;
2141 2131
2142 // play the sound. 2132 // play the sound.
@@ -2145,7 +2135,7 @@ namespace OpenSim.Region.Framework.Scenes
2145 SendSound(CollisionSound.ToString(), CollisionSoundVolume, true, (byte)0, 0, false, false); 2135 SendSound(CollisionSound.ToString(), CollisionSoundVolume, true, (byte)0, 0, false, false);
2146 } 2136 }
2147 2137
2148 if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.collision_start) != 0) 2138 if ((ParentGroup.RootPart.ScriptEvents & scriptEvents.collision_start) != 0)
2149 { 2139 {
2150 // do event notification 2140 // do event notification
2151 if (startedColliders.Count > 0) 2141 if (startedColliders.Count > 0)
@@ -2156,30 +2146,30 @@ namespace OpenSim.Region.Framework.Scenes
2156 { 2146 {
2157 if (localId == 0) 2147 if (localId == 0)
2158 continue; 2148 continue;
2159 2149
2160 if (m_parentGroup.Scene == null) 2150 if (ParentGroup.Scene == null)
2161 return; 2151 return;
2162 2152
2163 SceneObjectPart obj = m_parentGroup.Scene.GetSceneObjectPart(localId); 2153 SceneObjectPart obj = ParentGroup.Scene.GetSceneObjectPart(localId);
2164 string data = ""; 2154 string data = "";
2165 if (obj != null) 2155 if (obj != null)
2166 { 2156 {
2167 if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) 2157 if (ParentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString())
2168 || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) 2158 || ParentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name))
2169 { 2159 {
2170 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); 2160 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
2171 //If it is 1, it is to accept ONLY collisions from this object 2161 //If it is 1, it is to accept ONLY collisions from this object
2172 if (found) 2162 if (found)
2173 { 2163 {
2174 DetectedObject detobj = new DetectedObject(); 2164 DetectedObject detobj = new DetectedObject();
2175 detobj.keyUUID = obj.UUID; 2165 detobj.keyUUID = obj.UUID;
2176 detobj.nameStr = obj.Name; 2166 detobj.nameStr = obj.Name;
2177 detobj.ownerUUID = obj._ownerID; 2167 detobj.ownerUUID = obj.OwnerID;
2178 detobj.posVector = obj.AbsolutePosition; 2168 detobj.posVector = obj.AbsolutePosition;
2179 detobj.rotQuat = obj.GetWorldRotation(); 2169 detobj.rotQuat = obj.GetWorldRotation();
2180 detobj.velVector = obj.Velocity; 2170 detobj.velVector = obj.Velocity;
2181 detobj.colliderType = 0; 2171 detobj.colliderType = 0;
2182 detobj.groupUUID = obj._groupID; 2172 detobj.groupUUID = obj.GroupID;
2183 colliding.Add(detobj); 2173 colliding.Add(detobj);
2184 } 2174 }
2185 //If it is 0, it is to not accept collisions from this object 2175 //If it is 0, it is to not accept collisions from this object
@@ -2189,33 +2179,33 @@ namespace OpenSim.Region.Framework.Scenes
2189 } 2179 }
2190 else 2180 else
2191 { 2181 {
2192 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); 2182 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
2193 //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work 2183 //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work
2194 if (!found) 2184 if (!found)
2195 { 2185 {
2196 DetectedObject detobj = new DetectedObject(); 2186 DetectedObject detobj = new DetectedObject();
2197 detobj.keyUUID = obj.UUID; 2187 detobj.keyUUID = obj.UUID;
2198 detobj.nameStr = obj.Name; 2188 detobj.nameStr = obj.Name;
2199 detobj.ownerUUID = obj._ownerID; 2189 detobj.ownerUUID = obj.OwnerID;
2200 detobj.posVector = obj.AbsolutePosition; 2190 detobj.posVector = obj.AbsolutePosition;
2201 detobj.rotQuat = obj.GetWorldRotation(); 2191 detobj.rotQuat = obj.GetWorldRotation();
2202 detobj.velVector = obj.Velocity; 2192 detobj.velVector = obj.Velocity;
2203 detobj.colliderType = 0; 2193 detobj.colliderType = 0;
2204 detobj.groupUUID = obj._groupID; 2194 detobj.groupUUID = obj.GroupID;
2205 colliding.Add(detobj); 2195 colliding.Add(detobj);
2206 } 2196 }
2207 } 2197 }
2208 } 2198 }
2209 else 2199 else
2210 { 2200 {
2211 m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av) 2201 ParentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av)
2212 { 2202 {
2213 if (av.LocalId == localId) 2203 if (av.LocalId == localId)
2214 { 2204 {
2215 if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString()) 2205 if (ParentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString())
2216 || m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.Name)) 2206 || ParentGroup.RootPart.CollisionFilter.ContainsValue(av.Name))
2217 { 2207 {
2218 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1, out data); 2208 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
2219 //If it is 1, it is to accept ONLY collisions from this avatar 2209 //If it is 1, it is to accept ONLY collisions from this avatar
2220 if (found) 2210 if (found)
2221 { 2211 {
@@ -2237,7 +2227,7 @@ namespace OpenSim.Region.Framework.Scenes
2237 } 2227 }
2238 else 2228 else
2239 { 2229 {
2240 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1, out data); 2230 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
2241 //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work 2231 //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work
2242 if (!found) 2232 if (!found)
2243 { 2233 {
@@ -2262,8 +2252,8 @@ namespace OpenSim.Region.Framework.Scenes
2262 if (colliding.Count > 0) 2252 if (colliding.Count > 0)
2263 { 2253 {
2264 StartCollidingMessage.Colliders = colliding; 2254 StartCollidingMessage.Colliders = colliding;
2265 2255
2266 if (m_parentGroup.Scene == null) 2256 if (ParentGroup.Scene == null)
2267 return; 2257 return;
2268 2258
2269// if (m_parentGroup.PassCollision == true) 2259// if (m_parentGroup.PassCollision == true)
@@ -2271,12 +2261,12 @@ namespace OpenSim.Region.Framework.Scenes
2271// //TODO: Add pass to root prim! 2261// //TODO: Add pass to root prim!
2272// } 2262// }
2273 2263
2274 m_parentGroup.Scene.EventManager.TriggerScriptCollidingStart(LocalId, StartCollidingMessage); 2264 ParentGroup.Scene.EventManager.TriggerScriptCollidingStart(LocalId, StartCollidingMessage);
2275 } 2265 }
2276 } 2266 }
2277 } 2267 }
2278 2268
2279 if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.collision) != 0) 2269 if ((ParentGroup.RootPart.ScriptEvents & scriptEvents.collision) != 0)
2280 { 2270 {
2281 if (m_lastColliders.Count > 0) 2271 if (m_lastColliders.Count > 0)
2282 { 2272 {
@@ -2288,29 +2278,29 @@ namespace OpenSim.Region.Framework.Scenes
2288 if (localId == 0) 2278 if (localId == 0)
2289 continue; 2279 continue;
2290 2280
2291 if (m_parentGroup.Scene == null) 2281 if (ParentGroup.Scene == null)
2292 return; 2282 return;
2293 2283
2294 SceneObjectPart obj = m_parentGroup.Scene.GetSceneObjectPart(localId); 2284 SceneObjectPart obj = ParentGroup.Scene.GetSceneObjectPart(localId);
2295 string data = ""; 2285 string data = "";
2296 if (obj != null) 2286 if (obj != null)
2297 { 2287 {
2298 if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) 2288 if (ParentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString())
2299 || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) 2289 || ParentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name))
2300 { 2290 {
2301 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); 2291 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
2302 //If it is 1, it is to accept ONLY collisions from this object 2292 //If it is 1, it is to accept ONLY collisions from this object
2303 if (found) 2293 if (found)
2304 { 2294 {
2305 DetectedObject detobj = new DetectedObject(); 2295 DetectedObject detobj = new DetectedObject();
2306 detobj.keyUUID = obj.UUID; 2296 detobj.keyUUID = obj.UUID;
2307 detobj.nameStr = obj.Name; 2297 detobj.nameStr = obj.Name;
2308 detobj.ownerUUID = obj._ownerID; 2298 detobj.ownerUUID = obj.OwnerID;
2309 detobj.posVector = obj.AbsolutePosition; 2299 detobj.posVector = obj.AbsolutePosition;
2310 detobj.rotQuat = obj.GetWorldRotation(); 2300 detobj.rotQuat = obj.GetWorldRotation();
2311 detobj.velVector = obj.Velocity; 2301 detobj.velVector = obj.Velocity;
2312 detobj.colliderType = 0; 2302 detobj.colliderType = 0;
2313 detobj.groupUUID = obj._groupID; 2303 detobj.groupUUID = obj.GroupID;
2314 colliding.Add(detobj); 2304 colliding.Add(detobj);
2315 } 2305 }
2316 //If it is 0, it is to not accept collisions from this object 2306 //If it is 0, it is to not accept collisions from this object
@@ -2320,33 +2310,33 @@ namespace OpenSim.Region.Framework.Scenes
2320 } 2310 }
2321 else 2311 else
2322 { 2312 {
2323 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); 2313 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
2324 //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work 2314 //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work
2325 if (!found) 2315 if (!found)
2326 { 2316 {
2327 DetectedObject detobj = new DetectedObject(); 2317 DetectedObject detobj = new DetectedObject();
2328 detobj.keyUUID = obj.UUID; 2318 detobj.keyUUID = obj.UUID;
2329 detobj.nameStr = obj.Name; 2319 detobj.nameStr = obj.Name;
2330 detobj.ownerUUID = obj._ownerID; 2320 detobj.ownerUUID = obj.OwnerID;
2331 detobj.posVector = obj.AbsolutePosition; 2321 detobj.posVector = obj.AbsolutePosition;
2332 detobj.rotQuat = obj.GetWorldRotation(); 2322 detobj.rotQuat = obj.GetWorldRotation();
2333 detobj.velVector = obj.Velocity; 2323 detobj.velVector = obj.Velocity;
2334 detobj.colliderType = 0; 2324 detobj.colliderType = 0;
2335 detobj.groupUUID = obj._groupID; 2325 detobj.groupUUID = obj.GroupID;
2336 colliding.Add(detobj); 2326 colliding.Add(detobj);
2337 } 2327 }
2338 } 2328 }
2339 } 2329 }
2340 else 2330 else
2341 { 2331 {
2342 m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av) 2332 ParentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av)
2343 { 2333 {
2344 if (av.LocalId == localId) 2334 if (av.LocalId == localId)
2345 { 2335 {
2346 if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString()) 2336 if (ParentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString())
2347 || m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.Name)) 2337 || ParentGroup.RootPart.CollisionFilter.ContainsValue(av.Name))
2348 { 2338 {
2349 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1, out data); 2339 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
2350 //If it is 1, it is to accept ONLY collisions from this avatar 2340 //If it is 1, it is to accept ONLY collisions from this avatar
2351 if (found) 2341 if (found)
2352 { 2342 {
@@ -2368,7 +2358,7 @@ namespace OpenSim.Region.Framework.Scenes
2368 } 2358 }
2369 else 2359 else
2370 { 2360 {
2371 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1, out data); 2361 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
2372 //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work 2362 //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work
2373 if (!found) 2363 if (!found)
2374 { 2364 {
@@ -2393,15 +2383,15 @@ namespace OpenSim.Region.Framework.Scenes
2393 { 2383 {
2394 CollidingMessage.Colliders = colliding; 2384 CollidingMessage.Colliders = colliding;
2395 2385
2396 if (m_parentGroup.Scene == null) 2386 if (ParentGroup.Scene == null)
2397 return; 2387 return;
2398 2388
2399 m_parentGroup.Scene.EventManager.TriggerScriptColliding(LocalId, CollidingMessage); 2389 ParentGroup.Scene.EventManager.TriggerScriptColliding(LocalId, CollidingMessage);
2400 } 2390 }
2401 } 2391 }
2402 } 2392 }
2403 2393
2404 if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.collision_end) != 0) 2394 if ((ParentGroup.RootPart.ScriptEvents & scriptEvents.collision_end) != 0)
2405 { 2395 {
2406 if (endedColliders.Count > 0) 2396 if (endedColliders.Count > 0)
2407 { 2397 {
@@ -2412,28 +2402,28 @@ namespace OpenSim.Region.Framework.Scenes
2412 if (localId == 0) 2402 if (localId == 0)
2413 continue; 2403 continue;
2414 2404
2415 if (m_parentGroup.Scene == null) 2405 if (ParentGroup.Scene == null)
2416 return; 2406 return;
2417 2407
2418 SceneObjectPart obj = m_parentGroup.Scene.GetSceneObjectPart(localId); 2408 SceneObjectPart obj = ParentGroup.Scene.GetSceneObjectPart(localId);
2419 string data = ""; 2409 string data = "";
2420 if (obj != null) 2410 if (obj != null)
2421 { 2411 {
2422 if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) 2412 if (ParentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || ParentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name))
2423 { 2413 {
2424 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); 2414 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
2425 //If it is 1, it is to accept ONLY collisions from this object 2415 //If it is 1, it is to accept ONLY collisions from this object
2426 if (found) 2416 if (found)
2427 { 2417 {
2428 DetectedObject detobj = new DetectedObject(); 2418 DetectedObject detobj = new DetectedObject();
2429 detobj.keyUUID = obj.UUID; 2419 detobj.keyUUID = obj.UUID;
2430 detobj.nameStr = obj.Name; 2420 detobj.nameStr = obj.Name;
2431 detobj.ownerUUID = obj._ownerID; 2421 detobj.ownerUUID = obj.OwnerID;
2432 detobj.posVector = obj.AbsolutePosition; 2422 detobj.posVector = obj.AbsolutePosition;
2433 detobj.rotQuat = obj.GetWorldRotation(); 2423 detobj.rotQuat = obj.GetWorldRotation();
2434 detobj.velVector = obj.Velocity; 2424 detobj.velVector = obj.Velocity;
2435 detobj.colliderType = 0; 2425 detobj.colliderType = 0;
2436 detobj.groupUUID = obj._groupID; 2426 detobj.groupUUID = obj.GroupID;
2437 colliding.Add(detobj); 2427 colliding.Add(detobj);
2438 } 2428 }
2439 //If it is 0, it is to not accept collisions from this object 2429 //If it is 0, it is to not accept collisions from this object
@@ -2443,33 +2433,33 @@ namespace OpenSim.Region.Framework.Scenes
2443 } 2433 }
2444 else 2434 else
2445 { 2435 {
2446 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); 2436 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
2447 //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work 2437 //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work
2448 if (!found) 2438 if (!found)
2449 { 2439 {
2450 DetectedObject detobj = new DetectedObject(); 2440 DetectedObject detobj = new DetectedObject();
2451 detobj.keyUUID = obj.UUID; 2441 detobj.keyUUID = obj.UUID;
2452 detobj.nameStr = obj.Name; 2442 detobj.nameStr = obj.Name;
2453 detobj.ownerUUID = obj._ownerID; 2443 detobj.ownerUUID = obj.OwnerID;
2454 detobj.posVector = obj.AbsolutePosition; 2444 detobj.posVector = obj.AbsolutePosition;
2455 detobj.rotQuat = obj.GetWorldRotation(); 2445 detobj.rotQuat = obj.GetWorldRotation();
2456 detobj.velVector = obj.Velocity; 2446 detobj.velVector = obj.Velocity;
2457 detobj.colliderType = 0; 2447 detobj.colliderType = 0;
2458 detobj.groupUUID = obj._groupID; 2448 detobj.groupUUID = obj.GroupID;
2459 colliding.Add(detobj); 2449 colliding.Add(detobj);
2460 } 2450 }
2461 } 2451 }
2462 } 2452 }
2463 else 2453 else
2464 { 2454 {
2465 m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av) 2455 ParentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av)
2466 { 2456 {
2467 if (av.LocalId == localId) 2457 if (av.LocalId == localId)
2468 { 2458 {
2469 if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString()) 2459 if (ParentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString())
2470 || m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.Name)) 2460 || ParentGroup.RootPart.CollisionFilter.ContainsValue(av.Name))
2471 { 2461 {
2472 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1, out data); 2462 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
2473 //If it is 1, it is to accept ONLY collisions from this avatar 2463 //If it is 1, it is to accept ONLY collisions from this avatar
2474 if (found) 2464 if (found)
2475 { 2465 {
@@ -2491,7 +2481,7 @@ namespace OpenSim.Region.Framework.Scenes
2491 } 2481 }
2492 else 2482 else
2493 { 2483 {
2494 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1, out data); 2484 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
2495 //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work 2485 //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work
2496 if (!found) 2486 if (!found)
2497 { 2487 {
@@ -2517,15 +2507,15 @@ namespace OpenSim.Region.Framework.Scenes
2517 { 2507 {
2518 EndCollidingMessage.Colliders = colliding; 2508 EndCollidingMessage.Colliders = colliding;
2519 2509
2520 if (m_parentGroup.Scene == null) 2510 if (ParentGroup.Scene == null)
2521 return; 2511 return;
2522 2512
2523 m_parentGroup.Scene.EventManager.TriggerScriptCollidingEnd(LocalId, EndCollidingMessage); 2513 ParentGroup.Scene.EventManager.TriggerScriptCollidingEnd(LocalId, EndCollidingMessage);
2524 } 2514 }
2525 } 2515 }
2526 } 2516 }
2527 2517
2528 if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.land_collision_start) != 0) 2518 if ((ParentGroup.RootPart.ScriptEvents & scriptEvents.land_collision_start) != 0)
2529 { 2519 {
2530 if (startedColliders.Count > 0) 2520 if (startedColliders.Count > 0)
2531 { 2521 {
@@ -2540,7 +2530,7 @@ namespace OpenSim.Region.Framework.Scenes
2540 detobj.keyUUID = UUID.Zero; 2530 detobj.keyUUID = UUID.Zero;
2541 detobj.nameStr = ""; 2531 detobj.nameStr = "";
2542 detobj.ownerUUID = UUID.Zero; 2532 detobj.ownerUUID = UUID.Zero;
2543 detobj.posVector = m_parentGroup.RootPart.AbsolutePosition; 2533 detobj.posVector = ParentGroup.RootPart.AbsolutePosition;
2544 detobj.rotQuat = Quaternion.Identity; 2534 detobj.rotQuat = Quaternion.Identity;
2545 detobj.velVector = Vector3.Zero; 2535 detobj.velVector = Vector3.Zero;
2546 detobj.colliderType = 0; 2536 detobj.colliderType = 0;
@@ -2553,15 +2543,15 @@ namespace OpenSim.Region.Framework.Scenes
2553 { 2543 {
2554 LandStartCollidingMessage.Colliders = colliding; 2544 LandStartCollidingMessage.Colliders = colliding;
2555 2545
2556 if (m_parentGroup.Scene == null) 2546 if (ParentGroup.Scene == null)
2557 return; 2547 return;
2558 2548
2559 m_parentGroup.Scene.EventManager.TriggerScriptLandCollidingStart(LocalId, LandStartCollidingMessage); 2549 ParentGroup.Scene.EventManager.TriggerScriptLandCollidingStart(LocalId, LandStartCollidingMessage);
2560 } 2550 }
2561 } 2551 }
2562 } 2552 }
2563 2553
2564 if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.land_collision) != 0) 2554 if ((ParentGroup.RootPart.ScriptEvents & scriptEvents.land_collision) != 0)
2565 { 2555 {
2566 if (m_lastColliders.Count > 0) 2556 if (m_lastColliders.Count > 0)
2567 { 2557 {
@@ -2576,7 +2566,7 @@ namespace OpenSim.Region.Framework.Scenes
2576 detobj.keyUUID = UUID.Zero; 2566 detobj.keyUUID = UUID.Zero;
2577 detobj.nameStr = ""; 2567 detobj.nameStr = "";
2578 detobj.ownerUUID = UUID.Zero; 2568 detobj.ownerUUID = UUID.Zero;
2579 detobj.posVector = m_parentGroup.RootPart.AbsolutePosition; 2569 detobj.posVector = ParentGroup.RootPart.AbsolutePosition;
2580 detobj.rotQuat = Quaternion.Identity; 2570 detobj.rotQuat = Quaternion.Identity;
2581 detobj.velVector = Vector3.Zero; 2571 detobj.velVector = Vector3.Zero;
2582 detobj.colliderType = 0; 2572 detobj.colliderType = 0;
@@ -2589,15 +2579,15 @@ namespace OpenSim.Region.Framework.Scenes
2589 { 2579 {
2590 LandCollidingMessage.Colliders = colliding; 2580 LandCollidingMessage.Colliders = colliding;
2591 2581
2592 if (m_parentGroup.Scene == null) 2582 if (ParentGroup.Scene == null)
2593 return; 2583 return;
2594 2584
2595 m_parentGroup.Scene.EventManager.TriggerScriptLandColliding(LocalId, LandCollidingMessage); 2585 ParentGroup.Scene.EventManager.TriggerScriptLandColliding(LocalId, LandCollidingMessage);
2596 } 2586 }
2597 } 2587 }
2598 } 2588 }
2599 2589
2600 if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.land_collision_end) != 0) 2590 if ((ParentGroup.RootPart.ScriptEvents & scriptEvents.land_collision_end) != 0)
2601 { 2591 {
2602 if (endedColliders.Count > 0) 2592 if (endedColliders.Count > 0)
2603 { 2593 {
@@ -2612,7 +2602,7 @@ namespace OpenSim.Region.Framework.Scenes
2612 detobj.keyUUID = UUID.Zero; 2602 detobj.keyUUID = UUID.Zero;
2613 detobj.nameStr = ""; 2603 detobj.nameStr = "";
2614 detobj.ownerUUID = UUID.Zero; 2604 detobj.ownerUUID = UUID.Zero;
2615 detobj.posVector = m_parentGroup.RootPart.AbsolutePosition; 2605 detobj.posVector = ParentGroup.RootPart.AbsolutePosition;
2616 detobj.rotQuat = Quaternion.Identity; 2606 detobj.rotQuat = Quaternion.Identity;
2617 detobj.velVector = Vector3.Zero; 2607 detobj.velVector = Vector3.Zero;
2618 detobj.colliderType = 0; 2608 detobj.colliderType = 0;
@@ -2625,10 +2615,10 @@ namespace OpenSim.Region.Framework.Scenes
2625 { 2615 {
2626 LandEndCollidingMessage.Colliders = colliding; 2616 LandEndCollidingMessage.Colliders = colliding;
2627 2617
2628 if (m_parentGroup.Scene == null) 2618 if (ParentGroup.Scene == null)
2629 return; 2619 return;
2630 2620
2631 m_parentGroup.Scene.EventManager.TriggerScriptLandCollidingEnd(LocalId, LandEndCollidingMessage); 2621 ParentGroup.Scene.EventManager.TriggerScriptLandCollidingEnd(LocalId, LandEndCollidingMessage);
2632 } 2622 }
2633 } 2623 }
2634 } 2624 }
@@ -2640,7 +2630,7 @@ namespace OpenSim.Region.Framework.Scenes
2640 2630
2641 RemFlag(PrimFlags.Physics); 2631 RemFlag(PrimFlags.Physics);
2642 DoPhysicsPropertyUpdate(false, true); 2632 DoPhysicsPropertyUpdate(false, true);
2643 //m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); 2633 //ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
2644 } 2634 }
2645 2635
2646 public void PhysicsRequestingTerseUpdate() 2636 public void PhysicsRequestingTerseUpdate()
@@ -2649,15 +2639,15 @@ namespace OpenSim.Region.Framework.Scenes
2649 { 2639 {
2650 Vector3 newpos = new Vector3(PhysActor.Position.GetBytes(), 0); 2640 Vector3 newpos = new Vector3(PhysActor.Position.GetBytes(), 0);
2651 2641
2652 if (m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.N) 2642 if (ParentGroup.Scene.TestBorderCross(newpos, Cardinals.N)
2653 | m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.S) 2643 | ParentGroup.Scene.TestBorderCross(newpos, Cardinals.S)
2654 | m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.E) 2644 | ParentGroup.Scene.TestBorderCross(newpos, Cardinals.E)
2655 | m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.W)) 2645 | ParentGroup.Scene.TestBorderCross(newpos, Cardinals.W))
2656 { 2646 {
2657 m_parentGroup.AbsolutePosition = newpos; 2647 ParentGroup.AbsolutePosition = newpos;
2658 return; 2648 return;
2659 } 2649 }
2660 //m_parentGroup.RootPart.m_groupPosition = newpos; 2650 //ParentGroup.RootPart.m_groupPosition = newpos;
2661 } 2651 }
2662 ScheduleTerseUpdate(); 2652 ScheduleTerseUpdate();
2663 2653
@@ -2688,7 +2678,7 @@ namespace OpenSim.Region.Framework.Scenes
2688 } 2678 }
2689 } 2679 }
2690 2680
2691 m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence sp) 2681 ParentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence sp)
2692 { 2682 {
2693 if (!(Util.GetDistanceTo(sp.AbsolutePosition, AbsolutePosition) >= 100)) 2683 if (!(Util.GetDistanceTo(sp.AbsolutePosition, AbsolutePosition) >= 100))
2694 sp.ControllingClient.SendPreLoadSound(objectID, objectID, soundID); 2684 sp.ControllingClient.SendPreLoadSound(objectID, objectID, soundID);
@@ -2773,7 +2763,7 @@ namespace OpenSim.Region.Framework.Scenes
2773 2763
2774 public void rotLookAt(Quaternion target, float strength, float damping) 2764 public void rotLookAt(Quaternion target, float strength, float damping)
2775 { 2765 {
2776 if (m_parentGroup.IsAttachment) 2766 if (ParentGroup.IsAttachment)
2777 { 2767 {
2778 /* 2768 /*
2779 ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar); 2769 ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar);
@@ -2809,10 +2799,10 @@ namespace OpenSim.Region.Framework.Scenes
2809 { 2799 {
2810// m_log.DebugFormat("[SCENE OBJECT PART]: Scheduling full update for {0} {1}", Name, LocalId); 2800// m_log.DebugFormat("[SCENE OBJECT PART]: Scheduling full update for {0} {1}", Name, LocalId);
2811 2801
2812 if (m_parentGroup == null) 2802 if (ParentGroup == null)
2813 return; 2803 return;
2814 2804
2815 m_parentGroup.QueueForUpdateCheck(); 2805 ParentGroup.QueueForUpdateCheck();
2816 2806
2817 int timeNow = Util.UnixTimeSinceEpoch(); 2807 int timeNow = Util.UnixTimeSinceEpoch();
2818 2808
@@ -2841,13 +2831,13 @@ namespace OpenSim.Region.Framework.Scenes
2841 /// </summary> 2831 /// </summary>
2842 public void ScheduleTerseUpdate() 2832 public void ScheduleTerseUpdate()
2843 { 2833 {
2844 if (m_parentGroup == null) 2834 if (ParentGroup == null)
2845 return; 2835 return;
2846 2836
2847 if (UpdateFlag == UpdateRequired.NONE) 2837 if (UpdateFlag == UpdateRequired.NONE)
2848 { 2838 {
2849 m_parentGroup.HasGroupChanged = true; 2839 ParentGroup.HasGroupChanged = true;
2850 m_parentGroup.QueueForUpdateCheck(); 2840 ParentGroup.QueueForUpdateCheck();
2851 2841
2852 TimeStampTerse = (uint) Util.UnixTimeSinceEpoch(); 2842 TimeStampTerse = (uint) Util.UnixTimeSinceEpoch();
2853 UpdateFlag = UpdateRequired.TERSE; 2843 UpdateFlag = UpdateRequired.TERSE;
@@ -2860,7 +2850,7 @@ namespace OpenSim.Region.Framework.Scenes
2860 2850
2861 public void ScriptSetPhysicsStatus(bool UsePhysics) 2851 public void ScriptSetPhysicsStatus(bool UsePhysics)
2862 { 2852 {
2863 m_parentGroup.ScriptSetPhysicsStatus(UsePhysics); 2853 ParentGroup.ScriptSetPhysicsStatus(UsePhysics);
2864 } 2854 }
2865 2855
2866 /// <summary> 2856 /// <summary>
@@ -2887,7 +2877,7 @@ namespace OpenSim.Region.Framework.Scenes
2887 // Update the physics actor with the new loaded sculpt data and set the taint signal. 2877 // Update the physics actor with the new loaded sculpt data and set the taint signal.
2888 PhysActor.Shape = m_shape; 2878 PhysActor.Shape = m_shape;
2889 2879
2890 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); 2880 ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
2891 } 2881 }
2892 } 2882 }
2893 } 2883 }
@@ -2900,7 +2890,7 @@ namespace OpenSim.Region.Framework.Scenes
2900 /// <param name="clientFlags"></param> 2890 /// <param name="clientFlags"></param>
2901 protected internal void SendFullUpdate(IClientAPI remoteClient, uint clientFlags) 2891 protected internal void SendFullUpdate(IClientAPI remoteClient, uint clientFlags)
2902 { 2892 {
2903 if (m_parentGroup == null) 2893 if (ParentGroup == null)
2904 return; 2894 return;
2905 2895
2906// m_log.DebugFormat( 2896// m_log.DebugFormat(
@@ -2908,7 +2898,7 @@ namespace OpenSim.Region.Framework.Scenes
2908 2898
2909 if (IsRoot) 2899 if (IsRoot)
2910 { 2900 {
2911 if (m_parentGroup.IsAttachment) 2901 if (ParentGroup.IsAttachment)
2912 { 2902 {
2913 SendFullUpdateToClient(remoteClient, AttachedPos, clientFlags); 2903 SendFullUpdateToClient(remoteClient, AttachedPos, clientFlags);
2914 } 2904 }
@@ -2928,10 +2918,10 @@ namespace OpenSim.Region.Framework.Scenes
2928 /// </summary> 2918 /// </summary>
2929 public void SendFullUpdateToAllClients() 2919 public void SendFullUpdateToAllClients()
2930 { 2920 {
2931 if (m_parentGroup == null) 2921 if (ParentGroup == null)
2932 return; 2922 return;
2933 2923
2934 m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) 2924 ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
2935 { 2925 {
2936 SendFullUpdate(avatar.ControllingClient, avatar.GenerateClientFlags(UUID)); 2926 SendFullUpdate(avatar.ControllingClient, avatar.GenerateClientFlags(UUID));
2937 }); 2927 });
@@ -2943,10 +2933,10 @@ namespace OpenSim.Region.Framework.Scenes
2943 /// <param name="agentID"></param> 2933 /// <param name="agentID"></param>
2944 public void SendFullUpdateToAllClientsExcept(UUID agentID) 2934 public void SendFullUpdateToAllClientsExcept(UUID agentID)
2945 { 2935 {
2946 if (m_parentGroup == null) 2936 if (ParentGroup == null)
2947 return; 2937 return;
2948 2938
2949 m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) 2939 ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
2950 { 2940 {
2951 // Ugly reference :( 2941 // Ugly reference :(
2952 if (avatar.UUID != agentID) 2942 if (avatar.UUID != agentID)
@@ -2991,7 +2981,7 @@ namespace OpenSim.Region.Framework.Scenes
2991 2981
2992 clientFlags &= ~(uint) PrimFlags.CreateSelected; 2982 clientFlags &= ~(uint) PrimFlags.CreateSelected;
2993 2983
2994 if (remoteClient.AgentId == _ownerID) 2984 if (remoteClient.AgentId == OwnerID)
2995 { 2985 {
2996 if ((Flags & PrimFlags.CreateSelected) != 0) 2986 if ((Flags & PrimFlags.CreateSelected) != 0)
2997 { 2987 {
@@ -3067,13 +3057,13 @@ namespace OpenSim.Region.Framework.Scenes
3067 if (volume < 0) 3057 if (volume < 0)
3068 volume = 0; 3058 volume = 0;
3069 3059
3070 UUID ownerID = _ownerID; 3060 UUID ownerID = OwnerID;
3071 UUID objectID = ParentGroup.RootPart.UUID; 3061 UUID objectID = ParentGroup.RootPart.UUID;
3072 UUID parentID = ParentGroup.UUID; 3062 UUID parentID = ParentGroup.UUID;
3073 3063
3074 UUID soundID = UUID.Zero; 3064 UUID soundID = UUID.Zero;
3075 Vector3 position = AbsolutePosition; // region local 3065 Vector3 position = AbsolutePosition; // region local
3076 ulong regionHandle = m_parentGroup.Scene.RegionInfo.RegionHandle; 3066 ulong regionHandle = ParentGroup.Scene.RegionInfo.RegionHandle;
3077 3067
3078 if (!UUID.TryParse(sound, out soundID)) 3068 if (!UUID.TryParse(sound, out soundID))
3079 { 3069 {
@@ -3094,7 +3084,7 @@ namespace OpenSim.Region.Framework.Scenes
3094 if (soundID == UUID.Zero) 3084 if (soundID == UUID.Zero)
3095 return; 3085 return;
3096 3086
3097 ISoundModule soundModule = m_parentGroup.Scene.RequestModuleInterface<ISoundModule>(); 3087 ISoundModule soundModule = ParentGroup.Scene.RequestModuleInterface<ISoundModule>();
3098 if (soundModule != null) 3088 if (soundModule != null)
3099 { 3089 {
3100 if (useMaster) 3090 if (useMaster)
@@ -3106,7 +3096,7 @@ namespace OpenSim.Region.Framework.Scenes
3106 else 3096 else
3107 soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius); 3097 soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius);
3108 ParentGroup.PlaySoundMasterPrim = this; 3098 ParentGroup.PlaySoundMasterPrim = this;
3109 ownerID = _ownerID; 3099 ownerID = OwnerID;
3110 objectID = ParentGroup.RootPart.UUID; 3100 objectID = ParentGroup.RootPart.UUID;
3111 parentID = ParentGroup.UUID; 3101 parentID = ParentGroup.UUID;
3112 position = AbsolutePosition; // region local 3102 position = AbsolutePosition; // region local
@@ -3117,7 +3107,7 @@ namespace OpenSim.Region.Framework.Scenes
3117 soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius); 3107 soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius);
3118 foreach (SceneObjectPart prim in ParentGroup.PlaySoundSlavePrims) 3108 foreach (SceneObjectPart prim in ParentGroup.PlaySoundSlavePrims)
3119 { 3109 {
3120 ownerID = prim._ownerID; 3110 ownerID = prim.OwnerID;
3121 objectID = prim.ParentGroup.RootPart.UUID; 3111 objectID = prim.ParentGroup.RootPart.UUID;
3122 parentID = prim.ParentGroup.UUID; 3112 parentID = prim.ParentGroup.UUID;
3123 position = prim.AbsolutePosition; // region local 3113 position = prim.AbsolutePosition; // region local
@@ -3150,7 +3140,7 @@ namespace OpenSim.Region.Framework.Scenes
3150 /// </summary> 3140 /// </summary>
3151 public void SendTerseUpdateToAllClients() 3141 public void SendTerseUpdateToAllClients()
3152 { 3142 {
3153 m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) 3143 ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
3154 { 3144 {
3155 SendTerseUpdateToClient(avatar.ControllingClient); 3145 SendTerseUpdateToClient(avatar.ControllingClient);
3156 }); 3146 });
@@ -3158,7 +3148,7 @@ namespace OpenSim.Region.Framework.Scenes
3158 3148
3159 public void SetAxisRotation(int axis, int rotate) 3149 public void SetAxisRotation(int axis, int rotate)
3160 { 3150 {
3161 m_parentGroup.SetAxisRotation(axis, rotate); 3151 ParentGroup.SetAxisRotation(axis, rotate);
3162 3152
3163 //Cannot use ScriptBaseClass constants as no referance to it currently. 3153 //Cannot use ScriptBaseClass constants as no referance to it currently.
3164 if (axis == 2)//STATUS_ROTATE_X 3154 if (axis == 2)//STATUS_ROTATE_X
@@ -3181,10 +3171,10 @@ namespace OpenSim.Region.Framework.Scenes
3181 3171
3182 public void SetDieAtEdge(bool p) 3172 public void SetDieAtEdge(bool p)
3183 { 3173 {
3184 if (m_parentGroup.IsDeleted) 3174 if (ParentGroup.IsDeleted)
3185 return; 3175 return;
3186 3176
3187 m_parentGroup.RootPart.DIE_AT_EDGE = p; 3177 ParentGroup.RootPart.DIE_AT_EDGE = p;
3188 } 3178 }
3189 3179
3190 public void SetFloatOnWater(int floatYN) 3180 public void SetFloatOnWater(int floatYN)
@@ -3426,7 +3416,7 @@ namespace OpenSim.Region.Framework.Scenes
3426 3416
3427 public void SetGroup(UUID groupID, IClientAPI client) 3417 public void SetGroup(UUID groupID, IClientAPI client)
3428 { 3418 {
3429 _groupID = groupID; 3419 GroupID = groupID;
3430 if (client != null) 3420 if (client != null)
3431 SendPropertiesToClient(client); 3421 SendPropertiesToClient(client);
3432 UpdateFlag = UpdateRequired.FULL; 3422 UpdateFlag = UpdateRequired.FULL;
@@ -3437,13 +3427,13 @@ namespace OpenSim.Region.Framework.Scenes
3437 /// </summary> 3427 /// </summary>
3438 public void SetParent(SceneObjectGroup parent) 3428 public void SetParent(SceneObjectGroup parent)
3439 { 3429 {
3440 m_parentGroup = parent; 3430 ParentGroup = parent;
3441 } 3431 }
3442 3432
3443 // Use this for attachments! LocalID should be avatar's localid 3433 // Use this for attachments! LocalID should be avatar's localid
3444 public void SetParentLocalId(uint localID) 3434 public void SetParentLocalId(uint localID)
3445 { 3435 {
3446 _parentID = localID; 3436 ParentID = localID;
3447 } 3437 }
3448 3438
3449 public void SetPhysicsAxisRotation() 3439 public void SetPhysicsAxisRotation()
@@ -3451,7 +3441,7 @@ namespace OpenSim.Region.Framework.Scenes
3451 if (PhysActor != null) 3441 if (PhysActor != null)
3452 { 3442 {
3453 PhysActor.LockAngularMotion(RotationAxis); 3443 PhysActor.LockAngularMotion(RotationAxis);
3454 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); 3444 ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
3455 } 3445 }
3456 } 3446 }
3457 3447
@@ -3499,9 +3489,9 @@ namespace OpenSim.Region.Framework.Scenes
3499 3489
3500 public void StopLookAt() 3490 public void StopLookAt()
3501 { 3491 {
3502 m_parentGroup.stopLookAt(); 3492 ParentGroup.stopLookAt();
3503 3493
3504 m_parentGroup.ScheduleGroupForTerseUpdate(); 3494 ParentGroup.ScheduleGroupForTerseUpdate();
3505 } 3495 }
3506 3496
3507 /// <summary> 3497 /// <summary>
@@ -3521,10 +3511,10 @@ namespace OpenSim.Region.Framework.Scenes
3521 3511
3522 public void StopMoveToTarget() 3512 public void StopMoveToTarget()
3523 { 3513 {
3524 m_parentGroup.stopMoveToTarget(); 3514 ParentGroup.stopMoveToTarget();
3525 3515
3526 m_parentGroup.ScheduleGroupForTerseUpdate(); 3516 ParentGroup.ScheduleGroupForTerseUpdate();
3527 //m_parentGroup.ScheduleGroupForFullUpdate(); 3517 //ParentGroup.ScheduleGroupForFullUpdate();
3528 } 3518 }
3529 3519
3530 public void StoreUndoState() 3520 public void StoreUndoState()
@@ -3563,7 +3553,7 @@ namespace OpenSim.Region.Framework.Scenes
3563 // "[SCENE OBJECT PART]: Storing undo state for {0} {1}, forGroup {2}, initial stack size {3}", 3553 // "[SCENE OBJECT PART]: Storing undo state for {0} {1}, forGroup {2}, initial stack size {3}",
3564 // Name, LocalId, forGroup, m_undo.Count); 3554 // Name, LocalId, forGroup, m_undo.Count);
3565 3555
3566 if (m_parentGroup.GetSceneMaxUndo() > 0) 3556 if (ParentGroup.GetSceneMaxUndo() > 0)
3567 { 3557 {
3568 UndoState nUndo = new UndoState(this, forGroup); 3558 UndoState nUndo = new UndoState(this, forGroup);
3569 3559
@@ -3619,7 +3609,7 @@ namespace OpenSim.Region.Framework.Scenes
3619 { 3609 {
3620 UndoState nUndo = null; 3610 UndoState nUndo = null;
3621 3611
3622 if (m_parentGroup.GetSceneMaxUndo() > 0) 3612 if (ParentGroup.GetSceneMaxUndo() > 0)
3623 { 3613 {
3624 nUndo = new UndoState(this, goback.ForGroup); 3614 nUndo = new UndoState(this, goback.ForGroup);
3625 } 3615 }
@@ -3651,7 +3641,7 @@ namespace OpenSim.Region.Framework.Scenes
3651 3641
3652 if (gofwd != null) 3642 if (gofwd != null)
3653 { 3643 {
3654 if (m_parentGroup.GetSceneMaxUndo() > 0) 3644 if (ParentGroup.GetSceneMaxUndo() > 0)
3655 { 3645 {
3656 UndoState nUndo = new UndoState(this, gofwd.ForGroup); 3646 UndoState nUndo = new UndoState(this, gofwd.ForGroup);
3657 3647
@@ -4126,17 +4116,17 @@ namespace OpenSim.Region.Framework.Scenes
4126 4116
4127 public void TriggerScriptChangedEvent(Changed val) 4117 public void TriggerScriptChangedEvent(Changed val)
4128 { 4118 {
4129 if (m_parentGroup != null && m_parentGroup.Scene != null) 4119 if (ParentGroup != null && ParentGroup.Scene != null)
4130 m_parentGroup.Scene.EventManager.TriggerOnScriptChangedEvent(LocalId, (uint)val); 4120 ParentGroup.Scene.EventManager.TriggerOnScriptChangedEvent(LocalId, (uint)val);
4131 } 4121 }
4132 4122
4133 public void TrimPermissions() 4123 public void TrimPermissions()
4134 { 4124 {
4135 _baseMask &= (uint)PermissionMask.All; 4125 BaseMask &= (uint)PermissionMask.All;
4136 _ownerMask &= (uint)PermissionMask.All; 4126 OwnerMask &= (uint)PermissionMask.All;
4137 _groupMask &= (uint)PermissionMask.All; 4127 GroupMask &= (uint)PermissionMask.All;
4138 _everyoneMask &= (uint)PermissionMask.All; 4128 EveryoneMask &= (uint)PermissionMask.All;
4139 _nextOwnerMask &= (uint)PermissionMask.All; 4129 NextOwnerMask &= (uint)PermissionMask.All;
4140 } 4130 }
4141 4131
4142 public void UpdateExtraParam(ushort type, bool inUse, byte[] data) 4132 public void UpdateExtraParam(ushort type, bool inUse, byte[] data)
@@ -4147,7 +4137,7 @@ namespace OpenSim.Region.Framework.Scenes
4147 { 4137 {
4148 if (m_shape.SculptEntry && m_shape.SculptTexture != UUID.Zero) 4138 if (m_shape.SculptEntry && m_shape.SculptTexture != UUID.Zero)
4149 { 4139 {
4150 m_parentGroup.Scene.AssetService.Get(m_shape.SculptTexture.ToString(), this, AssetReceived); 4140 ParentGroup.Scene.AssetService.Get(m_shape.SculptTexture.ToString(), this, AssetReceived);
4151 } 4141 }
4152 } 4142 }
4153 4143
@@ -4210,46 +4200,46 @@ namespace OpenSim.Region.Framework.Scenes
4210 public void UpdatePermissions(UUID AgentID, byte field, uint localID, uint mask, byte addRemTF) 4200 public void UpdatePermissions(UUID AgentID, byte field, uint localID, uint mask, byte addRemTF)
4211 { 4201 {
4212 bool set = addRemTF == 1; 4202 bool set = addRemTF == 1;
4213 bool god = m_parentGroup.Scene.Permissions.IsGod(AgentID); 4203 bool god = ParentGroup.Scene.Permissions.IsGod(AgentID);
4214 4204
4215 uint baseMask = _baseMask; 4205 uint baseMask = BaseMask;
4216 if (god) 4206 if (god)
4217 baseMask = 0x7ffffff0; 4207 baseMask = 0x7ffffff0;
4218 4208
4219 // Are we the owner? 4209 // Are we the owner?
4220 if ((AgentID == _ownerID) || god) 4210 if ((AgentID == OwnerID) || god)
4221 { 4211 {
4222 switch (field) 4212 switch (field)
4223 { 4213 {
4224 case 1: 4214 case 1:
4225 if (god) 4215 if (god)
4226 { 4216 {
4227 _baseMask = ApplyMask(_baseMask, set, mask); 4217 BaseMask = ApplyMask(BaseMask, set, mask);
4228 Inventory.ApplyGodPermissions(_baseMask); 4218 Inventory.ApplyGodPermissions(_baseMask);
4229 } 4219 }
4230 4220
4231 break; 4221 break;
4232 case 2: 4222 case 2:
4233 _ownerMask = ApplyMask(_ownerMask, set, mask) & 4223 OwnerMask = ApplyMask(OwnerMask, set, mask) &
4234 baseMask; 4224 baseMask;
4235 break; 4225 break;
4236 case 4: 4226 case 4:
4237 _groupMask = ApplyMask(_groupMask, set, mask) & 4227 GroupMask = ApplyMask(GroupMask, set, mask) &
4238 baseMask; 4228 baseMask;
4239 break; 4229 break;
4240 case 8: 4230 case 8:
4241 _everyoneMask = ApplyMask(_everyoneMask, set, mask) & 4231 EveryoneMask = ApplyMask(EveryoneMask, set, mask) &
4242 baseMask; 4232 baseMask;
4243 break; 4233 break;
4244 case 16: 4234 case 16:
4245 _nextOwnerMask = ApplyMask(_nextOwnerMask, set, mask) & 4235 NextOwnerMask = ApplyMask(NextOwnerMask, set, mask) &
4246 baseMask; 4236 baseMask;
4247 // Prevent the client from creating no mod, no copy 4237 // Prevent the client from creating no mod, no copy
4248 // objects 4238 // objects
4249 if ((_nextOwnerMask & (uint)PermissionMask.Copy) == 0) 4239 if ((NextOwnerMask & (uint)PermissionMask.Copy) == 0)
4250 _nextOwnerMask |= (uint)PermissionMask.Transfer; 4240 NextOwnerMask |= (uint)PermissionMask.Transfer;
4251 4241
4252 _nextOwnerMask |= (uint)PermissionMask.Move; 4242 NextOwnerMask |= (uint)PermissionMask.Move;
4253 4243
4254 break; 4244 break;
4255 } 4245 }
@@ -4263,7 +4253,7 @@ namespace OpenSim.Region.Framework.Scenes
4263 // For now, we use the NINJA naming scheme for identifying joints. 4253 // For now, we use the NINJA naming scheme for identifying joints.
4264 // In the future, we can support other joint specification schemes such as a 4254 // In the future, we can support other joint specification schemes such as a
4265 // custom checkbox in the viewer GUI. 4255 // custom checkbox in the viewer GUI.
4266 if (m_parentGroup.Scene.PhysicsScene.SupportsNINJAJoints) 4256 if (ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
4267 { 4257 {
4268 string hingeString = "hingejoint"; 4258 string hingeString = "hingejoint";
4269 return (Name.Length >= hingeString.Length && Name.Substring(0, hingeString.Length) == hingeString); 4259 return (Name.Length >= hingeString.Length && Name.Substring(0, hingeString.Length) == hingeString);
@@ -4279,7 +4269,7 @@ namespace OpenSim.Region.Framework.Scenes
4279 // For now, we use the NINJA naming scheme for identifying joints. 4269 // For now, we use the NINJA naming scheme for identifying joints.
4280 // In the future, we can support other joint specification schemes such as a 4270 // In the future, we can support other joint specification schemes such as a
4281 // custom checkbox in the viewer GUI. 4271 // custom checkbox in the viewer GUI.
4282 if (m_parentGroup.Scene.PhysicsScene.SupportsNINJAJoints) 4272 if (ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
4283 { 4273 {
4284 string ballString = "balljoint"; 4274 string ballString = "balljoint";
4285 return (Name.Length >= ballString.Length && Name.Substring(0, ballString.Length) == ballString); 4275 return (Name.Length >= ballString.Length && Name.Substring(0, ballString.Length) == ballString);
@@ -4295,7 +4285,7 @@ namespace OpenSim.Region.Framework.Scenes
4295 // For now, we use the NINJA naming scheme for identifying joints. 4285 // For now, we use the NINJA naming scheme for identifying joints.
4296 // In the future, we can support other joint specification schemes such as a 4286 // In the future, we can support other joint specification schemes such as a
4297 // custom checkbox in the viewer GUI. 4287 // custom checkbox in the viewer GUI.
4298 if (m_parentGroup.Scene.PhysicsScene.SupportsNINJAJoints) 4288 if (ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
4299 { 4289 {
4300 return IsHingeJoint() || IsBallJoint(); 4290 return IsHingeJoint() || IsBallJoint();
4301 } 4291 }
@@ -4361,11 +4351,11 @@ namespace OpenSim.Region.Framework.Scenes
4361 { 4351 {
4362 DoPhysicsPropertyUpdate(UsePhysics, false); 4352 DoPhysicsPropertyUpdate(UsePhysics, false);
4363 4353
4364 if (!m_parentGroup.IsDeleted) 4354 if (!ParentGroup.IsDeleted)
4365 { 4355 {
4366 if (LocalId == m_parentGroup.RootPart.LocalId) 4356 if (LocalId == ParentGroup.RootPart.LocalId)
4367 { 4357 {
4368 m_parentGroup.CheckSculptAndLoad(); 4358 ParentGroup.CheckSculptAndLoad();
4369 } 4359 }
4370 } 4360 }
4371 } 4361 }
@@ -4398,7 +4388,7 @@ namespace OpenSim.Region.Framework.Scenes
4398 if (PhysActor == null) 4388 if (PhysActor == null)
4399 { 4389 {
4400 // It's not phantom anymore. So make sure the physics engine get's knowledge of it 4390 // It's not phantom anymore. So make sure the physics engine get's knowledge of it
4401 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( 4391 PhysActor = ParentGroup.Scene.PhysicsScene.AddPrimShape(
4402 string.Format("{0}/{1}", Name, UUID), 4392 string.Format("{0}/{1}", Name, UUID),
4403 Shape, 4393 Shape,
4404 AbsolutePosition, 4394 AbsolutePosition,
@@ -4410,11 +4400,11 @@ namespace OpenSim.Region.Framework.Scenes
4410 PhysActor.SetMaterial(Material); 4400 PhysActor.SetMaterial(Material);
4411 DoPhysicsPropertyUpdate(UsePhysics, true); 4401 DoPhysicsPropertyUpdate(UsePhysics, true);
4412 4402
4413 if (!m_parentGroup.IsDeleted) 4403 if (!ParentGroup.IsDeleted)
4414 { 4404 {
4415 if (LocalId == m_parentGroup.RootPart.LocalId) 4405 if (LocalId == ParentGroup.RootPart.LocalId)
4416 { 4406 {
4417 m_parentGroup.CheckSculptAndLoad(); 4407 ParentGroup.CheckSculptAndLoad();
4418 } 4408 }
4419 } 4409 }
4420 4410
@@ -4436,11 +4426,11 @@ namespace OpenSim.Region.Framework.Scenes
4436 { 4426 {
4437 DoPhysicsPropertyUpdate(UsePhysics, false); // Update physical status. If it's phantom this will remove the prim 4427 DoPhysicsPropertyUpdate(UsePhysics, false); // Update physical status. If it's phantom this will remove the prim
4438 4428
4439 if (!m_parentGroup.IsDeleted) 4429 if (!ParentGroup.IsDeleted)
4440 { 4430 {
4441 if (LocalId == m_parentGroup.RootPart.LocalId) 4431 if (LocalId == ParentGroup.RootPart.LocalId)
4442 { 4432 {
4443 m_parentGroup.CheckSculptAndLoad(); 4433 ParentGroup.CheckSculptAndLoad();
4444 } 4434 }
4445 } 4435 }
4446 } 4436 }
@@ -4552,7 +4542,7 @@ namespace OpenSim.Region.Framework.Scenes
4552 if (PhysActor != null) 4542 if (PhysActor != null)
4553 { 4543 {
4554 PhysActor.Shape = m_shape; 4544 PhysActor.Shape = m_shape;
4555 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); 4545 ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
4556 } 4546 }
4557 4547
4558 // This is what makes vehicle trailers work 4548 // This is what makes vehicle trailers work
@@ -4713,18 +4703,18 @@ namespace OpenSim.Region.Framework.Scenes
4713 4703
4714 //if ((GetEffectiveObjectFlags() & (uint)PrimFlags.Scripted) != 0) 4704 //if ((GetEffectiveObjectFlags() & (uint)PrimFlags.Scripted) != 0)
4715 //{ 4705 //{
4716 // m_parentGroup.Scene.EventManager.OnScriptTimerEvent += handleTimerAccounting; 4706 // ParentGroup.Scene.EventManager.OnScriptTimerEvent += handleTimerAccounting;
4717 //} 4707 //}
4718 //else 4708 //else
4719 //{ 4709 //{
4720 // m_parentGroup.Scene.EventManager.OnScriptTimerEvent -= handleTimerAccounting; 4710 // ParentGroup.Scene.EventManager.OnScriptTimerEvent -= handleTimerAccounting;
4721 //} 4711 //}
4722 4712
4723 LocalFlags = (PrimFlags)objectflagupdate; 4713 LocalFlags = (PrimFlags)objectflagupdate;
4724 4714
4725 if (m_parentGroup != null && m_parentGroup.RootPart == this) 4715 if (ParentGroup != null && ParentGroup.RootPart == this)
4726 { 4716 {
4727 m_parentGroup.aggregateScriptEvents(); 4717 ParentGroup.aggregateScriptEvents();
4728 } 4718 }
4729 else 4719 else
4730 { 4720 {
@@ -4792,14 +4782,14 @@ namespace OpenSim.Region.Framework.Scenes
4792 4782
4793 public void AddScriptLPS(int count) 4783 public void AddScriptLPS(int count)
4794 { 4784 {
4795 m_parentGroup.AddScriptLPS(count); 4785 ParentGroup.AddScriptLPS(count);
4796 } 4786 }
4797 4787
4798 public void ApplyNextOwnerPermissions() 4788 public void ApplyNextOwnerPermissions()
4799 { 4789 {
4800 _baseMask &= _nextOwnerMask; 4790 BaseMask &= NextOwnerMask;
4801 _ownerMask &= _nextOwnerMask; 4791 OwnerMask &= NextOwnerMask;
4802 _everyoneMask &= _nextOwnerMask; 4792 EveryoneMask &= NextOwnerMask;
4803 4793
4804 Inventory.ApplyNextOwnerPermissions(); 4794 Inventory.ApplyNextOwnerPermissions();
4805 } 4795 }