aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorMelanie2011-11-11 01:19:38 +0000
committerMelanie2011-11-11 01:19:38 +0000
commita9fbf3a4e03e27d7072bb9d13f52c2b81ce592f7 (patch)
treefb7b37d755d5822837ed5ddfabac6ea9ce6adf6a /OpenSim/Region/Framework
parentMerge branch 'master' into bigmerge (diff)
parentMerge branch 'master' of git://opensimulator.org/git/opensim (diff)
downloadopensim-SC-a9fbf3a4e03e27d7072bb9d13f52c2b81ce592f7.zip
opensim-SC-a9fbf3a4e03e27d7072bb9d13f52c2b81ce592f7.tar.gz
opensim-SC-a9fbf3a4e03e27d7072bb9d13f52c2b81ce592f7.tar.bz2
opensim-SC-a9fbf3a4e03e27d7072bb9d13f52c2b81ce592f7.tar.xz
Merge branch 'master' into bigmerge
Conflicts: OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs483
1 files changed, 236 insertions, 247 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 0970c92..7025551 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -268,7 +268,6 @@ namespace OpenSim.Region.Framework.Scenes
268 private string m_touchName = String.Empty; 268 private string m_touchName = String.Empty;
269 private readonly Stack<UndoState> m_undo = new Stack<UndoState>(5); 269 private readonly Stack<UndoState> m_undo = new Stack<UndoState>(5);
270 private readonly Stack<UndoState> m_redo = new Stack<UndoState>(5); 270 private readonly Stack<UndoState> m_redo = new Stack<UndoState>(5);
271 private UUID _creatorID;
272 271
273 private bool m_passTouches; 272 private bool m_passTouches;
274 273
@@ -355,19 +354,14 @@ namespace OpenSim.Region.Framework.Scenes
355 m_name = "Object"; 354 m_name = "Object";
356 355
357 Rezzed = DateTime.UtcNow; 356 Rezzed = DateTime.UtcNow;
358 _creationDate = (int)Utils.DateTimeToUnixTime(Rezzed); 357 CreationDate = (int)Utils.DateTimeToUnixTime(Rezzed);
359 _ownerID = ownerID; 358 LastOwnerID = CreatorID = OwnerID = ownerID;
360 _creatorID = _ownerID;
361 _lastOwnerID = UUID.Zero;
362 UUID = UUID.Random(); 359 UUID = UUID.Random();
363 Shape = shape; 360 Shape = shape;
364 // Todo: Add More Object Parameter from above! 361 OwnershipCost = 0;
365 _ownershipCost = 0; 362 ObjectSaleType = 0;
366 _objectSaleType = 0; 363 SalePrice = 0;
367 _salePrice = 0; 364 Category = 0;
368 _category = 0;
369 _lastOwnerID = _creatorID;
370 // End Todo: ///
371 GroupPosition = groupPosition; 365 GroupPosition = groupPosition;
372 OffsetPosition = offsetPosition; 366 OffsetPosition = offsetPosition;
373 RotationOffset = rotationOffset; 367 RotationOffset = rotationOffset;
@@ -412,20 +406,15 @@ namespace OpenSim.Region.Framework.Scenes
412 private DateTime m_expires; 406 private DateTime m_expires;
413 private DateTime m_rezzed; 407 private DateTime m_rezzed;
414 private bool m_createSelected = false; 408 private bool m_createSelected = false;
415 private string m_creatorData = string.Empty;
416 409
410 private UUID _creatorID;
417 public UUID CreatorID 411 public UUID CreatorID
418 { 412 {
419 get 413 get { return _creatorID; }
420 { 414 set { _creatorID = value; }
421 return _creatorID;
422 }
423 set
424 {
425 _creatorID = value;
426 }
427 } 415 }
428 416
417 private string m_creatorData = string.Empty;
429 /// <summary> 418 /// <summary>
430 /// Data about the creator in the form profile_url;name 419 /// Data about the creator in the form profile_url;name
431 /// </summary> 420 /// </summary>
@@ -444,16 +433,16 @@ namespace OpenSim.Region.Framework.Scenes
444 { 433 {
445 get 434 get
446 { 435 {
447 if (m_creatorData != null && m_creatorData != string.Empty) 436 if (CreatorData != null && CreatorData != string.Empty)
448 return _creatorID.ToString() + ';' + m_creatorData; 437 return CreatorID.ToString() + ';' + CreatorData;
449 else 438 else
450 return _creatorID.ToString(); 439 return CreatorID.ToString();
451 } 440 }
452 set 441 set
453 { 442 {
454 if ((value == null) || (value != null && value == string.Empty)) 443 if ((value == null) || (value != null && value == string.Empty))
455 { 444 {
456 m_creatorData = string.Empty; 445 CreatorData = string.Empty;
457 return; 446 return;
458 } 447 }
459 448
@@ -461,7 +450,7 @@ namespace OpenSim.Region.Framework.Scenes
461 { 450 {
462 UUID uuid = UUID.Zero; 451 UUID uuid = UUID.Zero;
463 UUID.TryParse(value, out uuid); 452 UUID.TryParse(value, out uuid);
464 _creatorID = uuid; 453 CreatorID = uuid;
465 } 454 }
466 else // <uuid>[;<endpoint>[;name]] 455 else // <uuid>[;<endpoint>[;name]]
467 { 456 {
@@ -471,14 +460,14 @@ namespace OpenSim.Region.Framework.Scenes
471 { 460 {
472 UUID uuid = UUID.Zero; 461 UUID uuid = UUID.Zero;
473 UUID.TryParse(parts[0], out uuid); 462 UUID.TryParse(parts[0], out uuid);
474 _creatorID = uuid; 463 CreatorID = uuid;
475 } 464 }
476 if (parts.Length >= 2) 465 if (parts.Length >= 2)
477 m_creatorData = parts[1]; 466 CreatorData = parts[1];
478 if (parts.Length >= 3) 467 if (parts.Length >= 3)
479 name = parts[2]; 468 name = parts[2];
480 469
481 m_creatorData += ';' + name; 470 CreatorData += ';' + name;
482 471
483 } 472 }
484 } 473 }
@@ -698,16 +687,16 @@ namespace OpenSim.Region.Framework.Scenes
698 { 687 {
699 // If this is a linkset, we don't want the physics engine mucking up our group position here. 688 // If this is a linkset, we don't want the physics engine mucking up our group position here.
700 PhysicsActor actor = PhysActor; 689 PhysicsActor actor = PhysActor;
701 if (_parentID == 0) 690 if (actor != null && ParentID == 0)
702 { 691 {
703 if (actor != null) 692 if (actor != null)
704 m_groupPosition = actor.Position; 693 m_groupPosition = actor.Position;
705 return m_groupPosition; 694 return m_groupPosition;
706 } 695 }
707 696
708 if (m_parentGroup.IsAttachment) 697 if (ParentGroup.IsAttachment)
709 { 698 {
710 ScenePresence sp = m_parentGroup.Scene.GetScenePresence(ParentGroup.AttachedAvatar); 699 ScenePresence sp = ParentGroup.Scene.GetScenePresence(ParentGroup.AttachedAvatar);
711 if (sp != null) 700 if (sp != null)
712 return sp.AbsolutePosition; 701 return sp.AbsolutePosition;
713 } 702 }
@@ -726,7 +715,7 @@ namespace OpenSim.Region.Framework.Scenes
726 try 715 try
727 { 716 {
728 // Root prim actually goes at Position 717 // Root prim actually goes at Position
729 if (_parentID == 0) 718 if (ParentID == 0)
730 { 719 {
731 actor.Position = value; 720 actor.Position = value;
732 } 721 }
@@ -738,8 +727,7 @@ namespace OpenSim.Region.Framework.Scenes
738 } 727 }
739 728
740 // Tell the physics engines that this prim changed. 729 // Tell the physics engines that this prim changed.
741 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor); 730 ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
742
743 } 731 }
744 catch (Exception e) 732 catch (Exception e)
745 { 733 {
@@ -760,14 +748,14 @@ namespace OpenSim.Region.Framework.Scenes
760 if (ParentGroup != null && !ParentGroup.IsDeleted) 748 if (ParentGroup != null && !ParentGroup.IsDeleted)
761 { 749 {
762 PhysicsActor actor = PhysActor; 750 PhysicsActor actor = PhysActor;
763 if (_parentID != 0 && actor != null) 751 if (ParentID != 0 && actor != null)
764 { 752 {
765 actor.Position = GetWorldPosition(); 753 actor.Position = GetWorldPosition();
766 actor.Orientation = GetWorldRotation(); 754 actor.Orientation = GetWorldRotation();
767 755
768 // Tell the physics engines that this prim changed. 756 // Tell the physics engines that this prim changed.
769 if (m_parentGroup.Scene != null) 757 if (ParentGroup.Scene != null)
770 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor); 758 ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
771 } 759 }
772 760
773 if (!m_parentGroup.m_dupeInProgress) 761 if (!m_parentGroup.m_dupeInProgress)
@@ -794,7 +782,7 @@ namespace OpenSim.Region.Framework.Scenes
794 { 782 {
795 if (IsRoot) 783 if (IsRoot)
796 { 784 {
797 if (m_parentGroup.IsAttachment) 785 if (ParentGroup.IsAttachment)
798 return AttachedPos; 786 return AttachedPos;
799 else 787 else
800 return AbsolutePosition; 788 return AbsolutePosition;
@@ -812,7 +800,7 @@ namespace OpenSim.Region.Framework.Scenes
812 { 800 {
813 // We don't want the physics engine mucking up the rotations in a linkset 801 // We don't want the physics engine mucking up the rotations in a linkset
814 PhysicsActor actor = PhysActor; 802 PhysicsActor actor = PhysActor;
815 if (_parentID == 0 && (Shape.PCode != 9 || Shape.State == 0) && actor != null) 803 if (ParentID == 0 && (Shape.PCode != 9 || Shape.State == 0) && actor != null)
816 { 804 {
817 if (actor.Orientation.X != 0f || actor.Orientation.Y != 0f 805 if (actor.Orientation.X != 0f || actor.Orientation.Y != 0f
818 || actor.Orientation.Z != 0f || actor.Orientation.W != 0f) 806 || actor.Orientation.Z != 0f || actor.Orientation.W != 0f)
@@ -842,7 +830,7 @@ namespace OpenSim.Region.Framework.Scenes
842 try 830 try
843 { 831 {
844 // Root prim gets value directly 832 // Root prim gets value directly
845 if (_parentID == 0) 833 if (ParentID == 0)
846 { 834 {
847 actor.Orientation = value; 835 actor.Orientation = value;
848 //m_log.Info("[PART]: RO1:" + actor.Orientation.ToString()); 836 //m_log.Info("[PART]: RO1:" + actor.Orientation.ToString());
@@ -855,8 +843,8 @@ namespace OpenSim.Region.Framework.Scenes
855 //m_log.Info("[PART]: RO2:" + actor.Orientation.ToString()); 843 //m_log.Info("[PART]: RO2:" + actor.Orientation.ToString());
856 } 844 }
857 845
858 if (m_parentGroup != null) 846 if (ParentGroup != null)
859 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor); 847 ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
860 //} 848 //}
861 } 849 }
862 catch (Exception ex) 850 catch (Exception ex)
@@ -901,7 +889,7 @@ namespace OpenSim.Region.Framework.Scenes
901 if (actor.IsPhysical) 889 if (actor.IsPhysical)
902 { 890 {
903 actor.Velocity = value; 891 actor.Velocity = value;
904 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor); 892 ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(actor);
905 } 893 }
906 } 894 }
907 } 895 }
@@ -1045,9 +1033,9 @@ namespace OpenSim.Region.Framework.Scenes
1045 PhysicsActor actor = PhysActor; 1033 PhysicsActor actor = PhysActor;
1046 if (actor != null) 1034 if (actor != null)
1047 { 1035 {
1048 if (m_parentGroup.Scene != null) 1036 if (ParentGroup.Scene != null)
1049 { 1037 {
1050 if (m_parentGroup.Scene.PhysicsScene != null) 1038 if (ParentGroup.Scene.PhysicsScene != null)
1051 { 1039 {
1052 actor.Size = m_shape.Scale; 1040 actor.Size = m_shape.Scale;
1053 1041
@@ -1109,7 +1097,7 @@ namespace OpenSim.Region.Framework.Scenes
1109 { 1097 {
1110 get 1098 get
1111 { 1099 {
1112 if (m_parentGroup.IsAttachment) 1100 if (ParentGroup.IsAttachment)
1113 return GroupPosition; 1101 return GroupPosition;
1114 1102
1115 return m_offsetPosition + m_groupPosition; 1103 return m_offsetPosition + m_groupPosition;
@@ -1119,6 +1107,7 @@ namespace OpenSim.Region.Framework.Scenes
1119 public SceneObjectGroup ParentGroup 1107 public SceneObjectGroup ParentGroup
1120 { 1108 {
1121 get { return m_parentGroup; } 1109 get { return m_parentGroup; }
1110 private set { m_parentGroup = value; }
1122 } 1111 }
1123 1112
1124 public scriptEvents ScriptEvents 1113 public scriptEvents ScriptEvents
@@ -1441,7 +1430,7 @@ namespace OpenSim.Region.Framework.Scenes
1441 /// </summary> 1430 /// </summary>
1442 public void AddFullUpdateToAllAvatars() 1431 public void AddFullUpdateToAllAvatars()
1443 { 1432 {
1444 m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) 1433 ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
1445 { 1434 {
1446 AddFullUpdateToAvatar(avatar); 1435 AddFullUpdateToAvatar(avatar);
1447 }); 1436 });
@@ -1468,7 +1457,7 @@ namespace OpenSim.Region.Framework.Scenes
1468 /// Terse updates 1457 /// Terse updates
1469 public void AddTerseUpdateToAllAvatars() 1458 public void AddTerseUpdateToAllAvatars()
1470 { 1459 {
1471 m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) 1460 ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
1472 { 1461 {
1473 AddTerseUpdateToAvatar(avatar); 1462 AddTerseUpdateToAvatar(avatar);
1474 }); 1463 });
@@ -1506,7 +1495,7 @@ namespace OpenSim.Region.Framework.Scenes
1506 if (volume < 0) 1495 if (volume < 0)
1507 volume = 0; 1496 volume = 0;
1508 1497
1509 m_parentGroup.Scene.ForEachRootClient(delegate(IClientAPI client) 1498 ParentGroup.Scene.ForEachRootClient(delegate(IClientAPI client)
1510 { 1499 {
1511 client.SendAttachedSoundGainChange(UUID, (float)volume); 1500 client.SendAttachedSoundGainChange(UUID, (float)volume);
1512 }); 1501 });
@@ -1532,9 +1521,9 @@ namespace OpenSim.Region.Framework.Scenes
1532 impulse = newimpulse; 1521 impulse = newimpulse;
1533 } 1522 }
1534 1523
1535 if (m_parentGroup != null) 1524 if (ParentGroup != null)
1536 { 1525 {
1537 m_parentGroup.applyImpulse(impulse); 1526 ParentGroup.applyImpulse(impulse);
1538 } 1527 }
1539 } 1528 }
1540 1529
@@ -1558,7 +1547,7 @@ namespace OpenSim.Region.Framework.Scenes
1558 impulse = newimpulse; 1547 impulse = newimpulse;
1559 } 1548 }
1560 1549
1561 m_parentGroup.applyAngularImpulse(impulse); 1550 ParentGroup.applyAngularImpulse(impulse);
1562 } 1551 }
1563 1552
1564 /// <summary> 1553 /// <summary>
@@ -1581,7 +1570,7 @@ namespace OpenSim.Region.Framework.Scenes
1581 impulse = newimpulse; 1570 impulse = newimpulse;
1582 } 1571 }
1583 1572
1584 m_parentGroup.setAngularImpulse(impulse); 1573 ParentGroup.setAngularImpulse(impulse);
1585 } 1574 }
1586 1575
1587 /// <summary> 1576 /// <summary>
@@ -1613,11 +1602,11 @@ namespace OpenSim.Region.Framework.Scenes
1613 1602
1614 // 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 1603 // 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
1615 // or flexible 1604 // or flexible
1616 if (!isPhantom && !m_parentGroup.IsAttachment && !(Shape.PathCurve == (byte) Extrusion.Flexible)) 1605 if (!isPhantom && !ParentGroup.IsAttachment && !(Shape.PathCurve == (byte)Extrusion.Flexible))
1617 { 1606 {
1618 try 1607 try
1619 { 1608 {
1620 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( 1609 PhysActor = ParentGroup.Scene.PhysicsScene.AddPrimShape(
1621 string.Format("{0}/{1}", Name, UUID), 1610 string.Format("{0}/{1}", Name, UUID),
1622 Shape, 1611 Shape,
1623 AbsolutePosition, 1612 AbsolutePosition,
@@ -1684,8 +1673,8 @@ namespace OpenSim.Region.Framework.Scenes
1684 if (!userExposed) 1673 if (!userExposed)
1685 dupe.PhysActor = null; 1674 dupe.PhysActor = null;
1686 1675
1687 dupe._ownerID = AgentID; 1676 dupe.OwnerID = AgentID;
1688 dupe._groupID = GroupID; 1677 dupe.GroupID = GroupID;
1689 dupe.GroupPosition = GroupPosition; 1678 dupe.GroupPosition = GroupPosition;
1690 dupe.OffsetPosition = OffsetPosition; 1679 dupe.OffsetPosition = OffsetPosition;
1691 dupe.RotationOffset = RotationOffset; 1680 dupe.RotationOffset = RotationOffset;
@@ -1694,10 +1683,10 @@ namespace OpenSim.Region.Framework.Scenes
1694 dupe.AngularVelocity = new Vector3(0, 0, 0); 1683 dupe.AngularVelocity = new Vector3(0, 0, 0);
1695 dupe.Flags = Flags; 1684 dupe.Flags = Flags;
1696 1685
1697 dupe._ownershipCost = _ownershipCost; 1686 dupe.OwnershipCost = OwnershipCost;
1698 dupe._objectSaleType = _objectSaleType; 1687 dupe.ObjectSaleType = ObjectSaleType;
1699 dupe._salePrice = _salePrice; 1688 dupe.SalePrice = SalePrice;
1700 dupe._category = _category; 1689 dupe.Category = Category;
1701 dupe.m_rezzed = m_rezzed; 1690 dupe.m_rezzed = m_rezzed;
1702 1691
1703 dupe.m_inventory = new SceneObjectPartInventory(dupe); 1692 dupe.m_inventory = new SceneObjectPartInventory(dupe);
@@ -1719,7 +1708,7 @@ namespace OpenSim.Region.Framework.Scenes
1719 dupe.PhysActor.LocalID = localID; 1708 dupe.PhysActor.LocalID = localID;
1720 1709
1721 // This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated. 1710 // This may be wrong... it might have to be applied in SceneObjectGroup to the object that's being duplicated.
1722 dupe._lastOwnerID = OwnerID; 1711 dupe.LastOwnerID = OwnerID;
1723 1712
1724 byte[] extraP = new byte[Shape.ExtraParams.Length]; 1713 byte[] extraP = new byte[Shape.ExtraParams.Length];
1725 Array.Copy(Shape.ExtraParams, extraP, extraP.Length); 1714 Array.Copy(Shape.ExtraParams, extraP, extraP.Length);
@@ -1806,7 +1795,7 @@ namespace OpenSim.Region.Framework.Scenes
1806 } 1795 }
1807 } 1796 }
1808 1797
1809 SceneObjectPart trackedBody = m_parentGroup.Scene.GetSceneObjectPart(trackedBodyName); // FIXME: causes a sequential lookup 1798 SceneObjectPart trackedBody = ParentGroup.Scene.GetSceneObjectPart(trackedBodyName); // FIXME: causes a sequential lookup
1810 Quaternion localRotation = Quaternion.Identity; 1799 Quaternion localRotation = Quaternion.Identity;
1811 if (trackedBody != null) 1800 if (trackedBody != null)
1812 { 1801 {
@@ -1819,7 +1808,7 @@ namespace OpenSim.Region.Framework.Scenes
1819 1808
1820 PhysicsJoint joint; 1809 PhysicsJoint joint;
1821 1810
1822 joint = m_parentGroup.Scene.PhysicsScene.RequestJointCreation(Name, jointType, 1811 joint = ParentGroup.Scene.PhysicsScene.RequestJointCreation(Name, jointType,
1823 AbsolutePosition, 1812 AbsolutePosition,
1824 this.RotationOffset, 1813 this.RotationOffset,
1825 Description, 1814 Description,
@@ -1844,7 +1833,7 @@ namespace OpenSim.Region.Framework.Scenes
1844 else 1833 else
1845 { 1834 {
1846 // here we turn off the joint object, so remove the joint from the physics scene 1835 // here we turn off the joint object, so remove the joint from the physics scene
1847 m_parentGroup.Scene.PhysicsScene.RequestJointDeletion(Name); // FIXME: what if the name changed? 1836 ParentGroup.Scene.PhysicsScene.RequestJointDeletion(Name); // FIXME: what if the name changed?
1848 1837
1849 // make sure client isn't interpolating the joint proxy object 1838 // make sure client isn't interpolating the joint proxy object
1850 Velocity = Vector3.Zero; 1839 Velocity = Vector3.Zero;
@@ -1886,7 +1875,7 @@ namespace OpenSim.Region.Framework.Scenes
1886 if (ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints && (!isNew)) 1875 if (ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints && (!isNew))
1887 { 1876 {
1888 // destroy all joints connected to this now deactivated body 1877 // destroy all joints connected to this now deactivated body
1889 m_parentGroup.Scene.PhysicsScene.RemoveAllJointsConnectedToActorThreadLocked(PhysActor); 1878 ParentGroup.Scene.PhysicsScene.RemoveAllJointsConnectedToActorThreadLocked(PhysActor);
1890 } 1879 }
1891 1880
1892 // stop client-side interpolation of all joint proxy objects that have just been deleted 1881 // stop client-side interpolation of all joint proxy objects that have just been deleted
@@ -1920,7 +1909,7 @@ namespace OpenSim.Region.Framework.Scenes
1920 1909
1921 PhysActor.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate; 1910 PhysActor.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate;
1922 PhysActor.OnOutOfBounds += PhysicsOutOfBounds; 1911 PhysActor.OnOutOfBounds += PhysicsOutOfBounds;
1923 if (_parentID != 0 && _parentID != LocalId) 1912 if (ParentID != 0 && ParentID != LocalId)
1924 { 1913 {
1925 if (ParentGroup.RootPart.PhysActor != null) 1914 if (ParentGroup.RootPart.PhysActor != null)
1926 { 1915 {
@@ -1936,7 +1925,7 @@ namespace OpenSim.Region.Framework.Scenes
1936 if (Shape.SculptEntry) 1925 if (Shape.SculptEntry)
1937 CheckSculptAndLoad(); 1926 CheckSculptAndLoad();
1938 else 1927 else
1939 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); 1928 ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
1940 } 1929 }
1941 } 1930 }
1942 } 1931 }
@@ -1959,58 +1948,58 @@ namespace OpenSim.Region.Framework.Scenes
1959 1948
1960 public bool GetDieAtEdge() 1949 public bool GetDieAtEdge()
1961 { 1950 {
1962 if (m_parentGroup.IsDeleted) 1951 if (ParentGroup.IsDeleted)
1963 return false; 1952 return false;
1964 1953
1965 return m_parentGroup.RootPart.DIE_AT_EDGE; 1954 return ParentGroup.RootPart.DIE_AT_EDGE;
1966 } 1955 }
1967 1956
1968 public bool GetReturnAtEdge() 1957 public bool GetReturnAtEdge()
1969 { 1958 {
1970 if (m_parentGroup.IsDeleted) 1959 if (ParentGroup.IsDeleted)
1971 return false; 1960 return false;
1972 1961
1973 return m_parentGroup.RootPart.RETURN_AT_EDGE; 1962 return ParentGroup.RootPart.RETURN_AT_EDGE;
1974 } 1963 }
1975 1964
1976 public void SetReturnAtEdge(bool p) 1965 public void SetReturnAtEdge(bool p)
1977 { 1966 {
1978 if (m_parentGroup.IsDeleted) 1967 if (ParentGroup.IsDeleted)
1979 return; 1968 return;
1980 1969
1981 m_parentGroup.RootPart.RETURN_AT_EDGE = p; 1970 ParentGroup.RootPart.RETURN_AT_EDGE = p;
1982 } 1971 }
1983 1972
1984 public bool GetBlockGrab() 1973 public bool GetBlockGrab()
1985 { 1974 {
1986 if (m_parentGroup.IsDeleted) 1975 if (ParentGroup.IsDeleted)
1987 return false; 1976 return false;
1988 1977
1989 return m_parentGroup.RootPart.BlockGrab; 1978 return ParentGroup.RootPart.BlockGrab;
1990 } 1979 }
1991 1980
1992 public void SetBlockGrab(bool p) 1981 public void SetBlockGrab(bool p)
1993 { 1982 {
1994 if (m_parentGroup.IsDeleted) 1983 if (ParentGroup.IsDeleted)
1995 return; 1984 return;
1996 1985
1997 m_parentGroup.RootPart.BlockGrab = p; 1986 ParentGroup.RootPart.BlockGrab = p;
1998 } 1987 }
1999 1988
2000 public void SetStatusSandbox(bool p) 1989 public void SetStatusSandbox(bool p)
2001 { 1990 {
2002 if (m_parentGroup.IsDeleted) 1991 if (ParentGroup.IsDeleted)
2003 return; 1992 return;
2004 StatusSandboxPos = m_parentGroup.RootPart.AbsolutePosition; 1993 StatusSandboxPos = ParentGroup.RootPart.AbsolutePosition;
2005 m_parentGroup.RootPart.StatusSandbox = p; 1994 ParentGroup.RootPart.StatusSandbox = p;
2006 } 1995 }
2007 1996
2008 public bool GetStatusSandbox() 1997 public bool GetStatusSandbox()
2009 { 1998 {
2010 if (m_parentGroup.IsDeleted) 1999 if (ParentGroup.IsDeleted)
2011 return false; 2000 return false;
2012 2001
2013 return m_parentGroup.RootPart.StatusSandbox; 2002 return ParentGroup.RootPart.StatusSandbox;
2014 } 2003 }
2015 2004
2016 public int GetAxisRotation(int axis) 2005 public int GetAxisRotation(int axis)
@@ -2118,7 +2107,7 @@ namespace OpenSim.Region.Framework.Scenes
2118 { 2107 {
2119 if (tau > 0) 2108 if (tau > 0)
2120 { 2109 {
2121 m_parentGroup.moveToTarget(target, tau); 2110 ParentGroup.moveToTarget(target, tau);
2122 } 2111 }
2123 else 2112 else
2124 { 2113 {
@@ -2134,12 +2123,12 @@ namespace OpenSim.Region.Framework.Scenes
2134 /// <param name="tau">Number of seconds over which to reach target</param> 2123 /// <param name="tau">Number of seconds over which to reach target</param>
2135 public void SetHoverHeight(float height, PIDHoverType hoverType, float tau) 2124 public void SetHoverHeight(float height, PIDHoverType hoverType, float tau)
2136 { 2125 {
2137 m_parentGroup.SetHoverHeight(height, hoverType, tau); 2126 ParentGroup.SetHoverHeight(height, hoverType, tau);
2138 } 2127 }
2139 2128
2140 public void StopHover() 2129 public void StopHover()
2141 { 2130 {
2142 m_parentGroup.SetHoverHeight(0f, PIDHoverType.Ground, 0f); 2131 ParentGroup.SetHoverHeight(0f, PIDHoverType.Ground, 0f);
2143 } 2132 }
2144 2133
2145 public virtual void OnGrab(Vector3 offsetPos, IClientAPI remoteClient) 2134 public virtual void OnGrab(Vector3 offsetPos, IClientAPI remoteClient)
@@ -2190,7 +2179,7 @@ namespace OpenSim.Region.Framework.Scenes
2190 m_lastColliders.Remove(localID); 2179 m_lastColliders.Remove(localID);
2191 } 2180 }
2192 2181
2193 if (m_parentGroup.IsDeleted) 2182 if (ParentGroup.IsDeleted)
2194 return; 2183 return;
2195 2184
2196 // play the sound. 2185 // play the sound.
@@ -2199,7 +2188,7 @@ namespace OpenSim.Region.Framework.Scenes
2199 SendSound(CollisionSound.ToString(), CollisionSoundVolume, true, (byte)0, 0, false, false); 2188 SendSound(CollisionSound.ToString(), CollisionSoundVolume, true, (byte)0, 0, false, false);
2200 } 2189 }
2201 2190
2202 if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.collision_start) != 0) 2191 if ((ParentGroup.RootPart.ScriptEvents & scriptEvents.collision_start) != 0)
2203 { 2192 {
2204 // do event notification 2193 // do event notification
2205 if (startedColliders.Count > 0) 2194 if (startedColliders.Count > 0)
@@ -2210,30 +2199,30 @@ namespace OpenSim.Region.Framework.Scenes
2210 { 2199 {
2211 if (localId == 0) 2200 if (localId == 0)
2212 continue; 2201 continue;
2213 2202
2214 if (m_parentGroup.Scene == null) 2203 if (ParentGroup.Scene == null)
2215 return; 2204 return;
2216 2205
2217 SceneObjectPart obj = m_parentGroup.Scene.GetSceneObjectPart(localId); 2206 SceneObjectPart obj = ParentGroup.Scene.GetSceneObjectPart(localId);
2218 string data = ""; 2207 string data = "";
2219 if (obj != null) 2208 if (obj != null)
2220 { 2209 {
2221 if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) 2210 if (ParentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString())
2222 || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) 2211 || ParentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name))
2223 { 2212 {
2224 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); 2213 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
2225 //If it is 1, it is to accept ONLY collisions from this object 2214 //If it is 1, it is to accept ONLY collisions from this object
2226 if (found) 2215 if (found)
2227 { 2216 {
2228 DetectedObject detobj = new DetectedObject(); 2217 DetectedObject detobj = new DetectedObject();
2229 detobj.keyUUID = obj.UUID; 2218 detobj.keyUUID = obj.UUID;
2230 detobj.nameStr = obj.Name; 2219 detobj.nameStr = obj.Name;
2231 detobj.ownerUUID = obj._ownerID; 2220 detobj.ownerUUID = obj.OwnerID;
2232 detobj.posVector = obj.AbsolutePosition; 2221 detobj.posVector = obj.AbsolutePosition;
2233 detobj.rotQuat = obj.GetWorldRotation(); 2222 detobj.rotQuat = obj.GetWorldRotation();
2234 detobj.velVector = obj.Velocity; 2223 detobj.velVector = obj.Velocity;
2235 detobj.colliderType = 0; 2224 detobj.colliderType = 0;
2236 detobj.groupUUID = obj._groupID; 2225 detobj.groupUUID = obj.GroupID;
2237 colliding.Add(detobj); 2226 colliding.Add(detobj);
2238 } 2227 }
2239 //If it is 0, it is to not accept collisions from this object 2228 //If it is 0, it is to not accept collisions from this object
@@ -2243,33 +2232,33 @@ namespace OpenSim.Region.Framework.Scenes
2243 } 2232 }
2244 else 2233 else
2245 { 2234 {
2246 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); 2235 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
2247 //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work 2236 //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work
2248 if (!found) 2237 if (!found)
2249 { 2238 {
2250 DetectedObject detobj = new DetectedObject(); 2239 DetectedObject detobj = new DetectedObject();
2251 detobj.keyUUID = obj.UUID; 2240 detobj.keyUUID = obj.UUID;
2252 detobj.nameStr = obj.Name; 2241 detobj.nameStr = obj.Name;
2253 detobj.ownerUUID = obj._ownerID; 2242 detobj.ownerUUID = obj.OwnerID;
2254 detobj.posVector = obj.AbsolutePosition; 2243 detobj.posVector = obj.AbsolutePosition;
2255 detobj.rotQuat = obj.GetWorldRotation(); 2244 detobj.rotQuat = obj.GetWorldRotation();
2256 detobj.velVector = obj.Velocity; 2245 detobj.velVector = obj.Velocity;
2257 detobj.colliderType = 0; 2246 detobj.colliderType = 0;
2258 detobj.groupUUID = obj._groupID; 2247 detobj.groupUUID = obj.GroupID;
2259 colliding.Add(detobj); 2248 colliding.Add(detobj);
2260 } 2249 }
2261 } 2250 }
2262 } 2251 }
2263 else 2252 else
2264 { 2253 {
2265 m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av) 2254 ParentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av)
2266 { 2255 {
2267 if (av.LocalId == localId) 2256 if (av.LocalId == localId)
2268 { 2257 {
2269 if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString()) 2258 if (ParentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString())
2270 || m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.Name)) 2259 || ParentGroup.RootPart.CollisionFilter.ContainsValue(av.Name))
2271 { 2260 {
2272 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1, out data); 2261 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
2273 //If it is 1, it is to accept ONLY collisions from this avatar 2262 //If it is 1, it is to accept ONLY collisions from this avatar
2274 if (found) 2263 if (found)
2275 { 2264 {
@@ -2291,7 +2280,7 @@ namespace OpenSim.Region.Framework.Scenes
2291 } 2280 }
2292 else 2281 else
2293 { 2282 {
2294 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1, out data); 2283 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
2295 //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work 2284 //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work
2296 if (!found) 2285 if (!found)
2297 { 2286 {
@@ -2316,8 +2305,8 @@ namespace OpenSim.Region.Framework.Scenes
2316 if (colliding.Count > 0) 2305 if (colliding.Count > 0)
2317 { 2306 {
2318 StartCollidingMessage.Colliders = colliding; 2307 StartCollidingMessage.Colliders = colliding;
2319 2308
2320 if (m_parentGroup.Scene == null) 2309 if (ParentGroup.Scene == null)
2321 return; 2310 return;
2322 2311
2323// if (m_parentGroup.PassCollision == true) 2312// if (m_parentGroup.PassCollision == true)
@@ -2325,12 +2314,12 @@ namespace OpenSim.Region.Framework.Scenes
2325// //TODO: Add pass to root prim! 2314// //TODO: Add pass to root prim!
2326// } 2315// }
2327 2316
2328 m_parentGroup.Scene.EventManager.TriggerScriptCollidingStart(LocalId, StartCollidingMessage); 2317 ParentGroup.Scene.EventManager.TriggerScriptCollidingStart(LocalId, StartCollidingMessage);
2329 } 2318 }
2330 } 2319 }
2331 } 2320 }
2332 2321
2333 if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.collision) != 0) 2322 if ((ParentGroup.RootPart.ScriptEvents & scriptEvents.collision) != 0)
2334 { 2323 {
2335 if (m_lastColliders.Count > 0) 2324 if (m_lastColliders.Count > 0)
2336 { 2325 {
@@ -2342,29 +2331,29 @@ namespace OpenSim.Region.Framework.Scenes
2342 if (localId == 0) 2331 if (localId == 0)
2343 continue; 2332 continue;
2344 2333
2345 if (m_parentGroup.Scene == null) 2334 if (ParentGroup.Scene == null)
2346 return; 2335 return;
2347 2336
2348 SceneObjectPart obj = m_parentGroup.Scene.GetSceneObjectPart(localId); 2337 SceneObjectPart obj = ParentGroup.Scene.GetSceneObjectPart(localId);
2349 string data = ""; 2338 string data = "";
2350 if (obj != null) 2339 if (obj != null)
2351 { 2340 {
2352 if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) 2341 if (ParentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString())
2353 || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) 2342 || ParentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name))
2354 { 2343 {
2355 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); 2344 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
2356 //If it is 1, it is to accept ONLY collisions from this object 2345 //If it is 1, it is to accept ONLY collisions from this object
2357 if (found) 2346 if (found)
2358 { 2347 {
2359 DetectedObject detobj = new DetectedObject(); 2348 DetectedObject detobj = new DetectedObject();
2360 detobj.keyUUID = obj.UUID; 2349 detobj.keyUUID = obj.UUID;
2361 detobj.nameStr = obj.Name; 2350 detobj.nameStr = obj.Name;
2362 detobj.ownerUUID = obj._ownerID; 2351 detobj.ownerUUID = obj.OwnerID;
2363 detobj.posVector = obj.AbsolutePosition; 2352 detobj.posVector = obj.AbsolutePosition;
2364 detobj.rotQuat = obj.GetWorldRotation(); 2353 detobj.rotQuat = obj.GetWorldRotation();
2365 detobj.velVector = obj.Velocity; 2354 detobj.velVector = obj.Velocity;
2366 detobj.colliderType = 0; 2355 detobj.colliderType = 0;
2367 detobj.groupUUID = obj._groupID; 2356 detobj.groupUUID = obj.GroupID;
2368 colliding.Add(detobj); 2357 colliding.Add(detobj);
2369 } 2358 }
2370 //If it is 0, it is to not accept collisions from this object 2359 //If it is 0, it is to not accept collisions from this object
@@ -2374,33 +2363,33 @@ namespace OpenSim.Region.Framework.Scenes
2374 } 2363 }
2375 else 2364 else
2376 { 2365 {
2377 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); 2366 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
2378 //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work 2367 //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work
2379 if (!found) 2368 if (!found)
2380 { 2369 {
2381 DetectedObject detobj = new DetectedObject(); 2370 DetectedObject detobj = new DetectedObject();
2382 detobj.keyUUID = obj.UUID; 2371 detobj.keyUUID = obj.UUID;
2383 detobj.nameStr = obj.Name; 2372 detobj.nameStr = obj.Name;
2384 detobj.ownerUUID = obj._ownerID; 2373 detobj.ownerUUID = obj.OwnerID;
2385 detobj.posVector = obj.AbsolutePosition; 2374 detobj.posVector = obj.AbsolutePosition;
2386 detobj.rotQuat = obj.GetWorldRotation(); 2375 detobj.rotQuat = obj.GetWorldRotation();
2387 detobj.velVector = obj.Velocity; 2376 detobj.velVector = obj.Velocity;
2388 detobj.colliderType = 0; 2377 detobj.colliderType = 0;
2389 detobj.groupUUID = obj._groupID; 2378 detobj.groupUUID = obj.GroupID;
2390 colliding.Add(detobj); 2379 colliding.Add(detobj);
2391 } 2380 }
2392 } 2381 }
2393 } 2382 }
2394 else 2383 else
2395 { 2384 {
2396 m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av) 2385 ParentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av)
2397 { 2386 {
2398 if (av.LocalId == localId) 2387 if (av.LocalId == localId)
2399 { 2388 {
2400 if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString()) 2389 if (ParentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString())
2401 || m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.Name)) 2390 || ParentGroup.RootPart.CollisionFilter.ContainsValue(av.Name))
2402 { 2391 {
2403 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1, out data); 2392 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
2404 //If it is 1, it is to accept ONLY collisions from this avatar 2393 //If it is 1, it is to accept ONLY collisions from this avatar
2405 if (found) 2394 if (found)
2406 { 2395 {
@@ -2422,7 +2411,7 @@ namespace OpenSim.Region.Framework.Scenes
2422 } 2411 }
2423 else 2412 else
2424 { 2413 {
2425 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1, out data); 2414 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
2426 //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work 2415 //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work
2427 if (!found) 2416 if (!found)
2428 { 2417 {
@@ -2447,15 +2436,15 @@ namespace OpenSim.Region.Framework.Scenes
2447 { 2436 {
2448 CollidingMessage.Colliders = colliding; 2437 CollidingMessage.Colliders = colliding;
2449 2438
2450 if (m_parentGroup.Scene == null) 2439 if (ParentGroup.Scene == null)
2451 return; 2440 return;
2452 2441
2453 m_parentGroup.Scene.EventManager.TriggerScriptColliding(LocalId, CollidingMessage); 2442 ParentGroup.Scene.EventManager.TriggerScriptColliding(LocalId, CollidingMessage);
2454 } 2443 }
2455 } 2444 }
2456 } 2445 }
2457 2446
2458 if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.collision_end) != 0) 2447 if ((ParentGroup.RootPart.ScriptEvents & scriptEvents.collision_end) != 0)
2459 { 2448 {
2460 if (endedColliders.Count > 0) 2449 if (endedColliders.Count > 0)
2461 { 2450 {
@@ -2466,28 +2455,28 @@ namespace OpenSim.Region.Framework.Scenes
2466 if (localId == 0) 2455 if (localId == 0)
2467 continue; 2456 continue;
2468 2457
2469 if (m_parentGroup.Scene == null) 2458 if (ParentGroup.Scene == null)
2470 return; 2459 return;
2471 2460
2472 SceneObjectPart obj = m_parentGroup.Scene.GetSceneObjectPart(localId); 2461 SceneObjectPart obj = ParentGroup.Scene.GetSceneObjectPart(localId);
2473 string data = ""; 2462 string data = "";
2474 if (obj != null) 2463 if (obj != null)
2475 { 2464 {
2476 if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || m_parentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name)) 2465 if (ParentGroup.RootPart.CollisionFilter.ContainsValue(obj.UUID.ToString()) || ParentGroup.RootPart.CollisionFilter.ContainsValue(obj.Name))
2477 { 2466 {
2478 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); 2467 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
2479 //If it is 1, it is to accept ONLY collisions from this object 2468 //If it is 1, it is to accept ONLY collisions from this object
2480 if (found) 2469 if (found)
2481 { 2470 {
2482 DetectedObject detobj = new DetectedObject(); 2471 DetectedObject detobj = new DetectedObject();
2483 detobj.keyUUID = obj.UUID; 2472 detobj.keyUUID = obj.UUID;
2484 detobj.nameStr = obj.Name; 2473 detobj.nameStr = obj.Name;
2485 detobj.ownerUUID = obj._ownerID; 2474 detobj.ownerUUID = obj.OwnerID;
2486 detobj.posVector = obj.AbsolutePosition; 2475 detobj.posVector = obj.AbsolutePosition;
2487 detobj.rotQuat = obj.GetWorldRotation(); 2476 detobj.rotQuat = obj.GetWorldRotation();
2488 detobj.velVector = obj.Velocity; 2477 detobj.velVector = obj.Velocity;
2489 detobj.colliderType = 0; 2478 detobj.colliderType = 0;
2490 detobj.groupUUID = obj._groupID; 2479 detobj.groupUUID = obj.GroupID;
2491 colliding.Add(detobj); 2480 colliding.Add(detobj);
2492 } 2481 }
2493 //If it is 0, it is to not accept collisions from this object 2482 //If it is 0, it is to not accept collisions from this object
@@ -2497,33 +2486,33 @@ namespace OpenSim.Region.Framework.Scenes
2497 } 2486 }
2498 else 2487 else
2499 { 2488 {
2500 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1,out data); 2489 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1,out data);
2501 //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work 2490 //If it is 1, it is to accept ONLY collisions from this object, so this other object will not work
2502 if (!found) 2491 if (!found)
2503 { 2492 {
2504 DetectedObject detobj = new DetectedObject(); 2493 DetectedObject detobj = new DetectedObject();
2505 detobj.keyUUID = obj.UUID; 2494 detobj.keyUUID = obj.UUID;
2506 detobj.nameStr = obj.Name; 2495 detobj.nameStr = obj.Name;
2507 detobj.ownerUUID = obj._ownerID; 2496 detobj.ownerUUID = obj.OwnerID;
2508 detobj.posVector = obj.AbsolutePosition; 2497 detobj.posVector = obj.AbsolutePosition;
2509 detobj.rotQuat = obj.GetWorldRotation(); 2498 detobj.rotQuat = obj.GetWorldRotation();
2510 detobj.velVector = obj.Velocity; 2499 detobj.velVector = obj.Velocity;
2511 detobj.colliderType = 0; 2500 detobj.colliderType = 0;
2512 detobj.groupUUID = obj._groupID; 2501 detobj.groupUUID = obj.GroupID;
2513 colliding.Add(detobj); 2502 colliding.Add(detobj);
2514 } 2503 }
2515 } 2504 }
2516 } 2505 }
2517 else 2506 else
2518 { 2507 {
2519 m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av) 2508 ParentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av)
2520 { 2509 {
2521 if (av.LocalId == localId) 2510 if (av.LocalId == localId)
2522 { 2511 {
2523 if (m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString()) 2512 if (ParentGroup.RootPart.CollisionFilter.ContainsValue(av.UUID.ToString())
2524 || m_parentGroup.RootPart.CollisionFilter.ContainsValue(av.Name)) 2513 || ParentGroup.RootPart.CollisionFilter.ContainsValue(av.Name))
2525 { 2514 {
2526 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1, out data); 2515 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
2527 //If it is 1, it is to accept ONLY collisions from this avatar 2516 //If it is 1, it is to accept ONLY collisions from this avatar
2528 if (found) 2517 if (found)
2529 { 2518 {
@@ -2545,7 +2534,7 @@ namespace OpenSim.Region.Framework.Scenes
2545 } 2534 }
2546 else 2535 else
2547 { 2536 {
2548 bool found = m_parentGroup.RootPart.CollisionFilter.TryGetValue(1, out data); 2537 bool found = ParentGroup.RootPart.CollisionFilter.TryGetValue(1, out data);
2549 //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work 2538 //If it is 1, it is to accept ONLY collisions from this avatar, so this other avatar will not work
2550 if (!found) 2539 if (!found)
2551 { 2540 {
@@ -2571,15 +2560,15 @@ namespace OpenSim.Region.Framework.Scenes
2571 { 2560 {
2572 EndCollidingMessage.Colliders = colliding; 2561 EndCollidingMessage.Colliders = colliding;
2573 2562
2574 if (m_parentGroup.Scene == null) 2563 if (ParentGroup.Scene == null)
2575 return; 2564 return;
2576 2565
2577 m_parentGroup.Scene.EventManager.TriggerScriptCollidingEnd(LocalId, EndCollidingMessage); 2566 ParentGroup.Scene.EventManager.TriggerScriptCollidingEnd(LocalId, EndCollidingMessage);
2578 } 2567 }
2579 } 2568 }
2580 } 2569 }
2581 2570
2582 if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.land_collision_start) != 0) 2571 if ((ParentGroup.RootPart.ScriptEvents & scriptEvents.land_collision_start) != 0)
2583 { 2572 {
2584 if (startedColliders.Count > 0) 2573 if (startedColliders.Count > 0)
2585 { 2574 {
@@ -2594,7 +2583,7 @@ namespace OpenSim.Region.Framework.Scenes
2594 detobj.keyUUID = UUID.Zero; 2583 detobj.keyUUID = UUID.Zero;
2595 detobj.nameStr = ""; 2584 detobj.nameStr = "";
2596 detobj.ownerUUID = UUID.Zero; 2585 detobj.ownerUUID = UUID.Zero;
2597 detobj.posVector = m_parentGroup.RootPart.AbsolutePosition; 2586 detobj.posVector = ParentGroup.RootPart.AbsolutePosition;
2598 detobj.rotQuat = Quaternion.Identity; 2587 detobj.rotQuat = Quaternion.Identity;
2599 detobj.velVector = Vector3.Zero; 2588 detobj.velVector = Vector3.Zero;
2600 detobj.colliderType = 0; 2589 detobj.colliderType = 0;
@@ -2607,15 +2596,15 @@ namespace OpenSim.Region.Framework.Scenes
2607 { 2596 {
2608 LandStartCollidingMessage.Colliders = colliding; 2597 LandStartCollidingMessage.Colliders = colliding;
2609 2598
2610 if (m_parentGroup.Scene == null) 2599 if (ParentGroup.Scene == null)
2611 return; 2600 return;
2612 2601
2613 m_parentGroup.Scene.EventManager.TriggerScriptLandCollidingStart(LocalId, LandStartCollidingMessage); 2602 ParentGroup.Scene.EventManager.TriggerScriptLandCollidingStart(LocalId, LandStartCollidingMessage);
2614 } 2603 }
2615 } 2604 }
2616 } 2605 }
2617 2606
2618 if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.land_collision) != 0) 2607 if ((ParentGroup.RootPart.ScriptEvents & scriptEvents.land_collision) != 0)
2619 { 2608 {
2620 if (m_lastColliders.Count > 0) 2609 if (m_lastColliders.Count > 0)
2621 { 2610 {
@@ -2630,7 +2619,7 @@ namespace OpenSim.Region.Framework.Scenes
2630 detobj.keyUUID = UUID.Zero; 2619 detobj.keyUUID = UUID.Zero;
2631 detobj.nameStr = ""; 2620 detobj.nameStr = "";
2632 detobj.ownerUUID = UUID.Zero; 2621 detobj.ownerUUID = UUID.Zero;
2633 detobj.posVector = m_parentGroup.RootPart.AbsolutePosition; 2622 detobj.posVector = ParentGroup.RootPart.AbsolutePosition;
2634 detobj.rotQuat = Quaternion.Identity; 2623 detobj.rotQuat = Quaternion.Identity;
2635 detobj.velVector = Vector3.Zero; 2624 detobj.velVector = Vector3.Zero;
2636 detobj.colliderType = 0; 2625 detobj.colliderType = 0;
@@ -2643,15 +2632,15 @@ namespace OpenSim.Region.Framework.Scenes
2643 { 2632 {
2644 LandCollidingMessage.Colliders = colliding; 2633 LandCollidingMessage.Colliders = colliding;
2645 2634
2646 if (m_parentGroup.Scene == null) 2635 if (ParentGroup.Scene == null)
2647 return; 2636 return;
2648 2637
2649 m_parentGroup.Scene.EventManager.TriggerScriptLandColliding(LocalId, LandCollidingMessage); 2638 ParentGroup.Scene.EventManager.TriggerScriptLandColliding(LocalId, LandCollidingMessage);
2650 } 2639 }
2651 } 2640 }
2652 } 2641 }
2653 2642
2654 if ((m_parentGroup.RootPart.ScriptEvents & scriptEvents.land_collision_end) != 0) 2643 if ((ParentGroup.RootPart.ScriptEvents & scriptEvents.land_collision_end) != 0)
2655 { 2644 {
2656 if (endedColliders.Count > 0) 2645 if (endedColliders.Count > 0)
2657 { 2646 {
@@ -2666,7 +2655,7 @@ namespace OpenSim.Region.Framework.Scenes
2666 detobj.keyUUID = UUID.Zero; 2655 detobj.keyUUID = UUID.Zero;
2667 detobj.nameStr = ""; 2656 detobj.nameStr = "";
2668 detobj.ownerUUID = UUID.Zero; 2657 detobj.ownerUUID = UUID.Zero;
2669 detobj.posVector = m_parentGroup.RootPart.AbsolutePosition; 2658 detobj.posVector = ParentGroup.RootPart.AbsolutePosition;
2670 detobj.rotQuat = Quaternion.Identity; 2659 detobj.rotQuat = Quaternion.Identity;
2671 detobj.velVector = Vector3.Zero; 2660 detobj.velVector = Vector3.Zero;
2672 detobj.colliderType = 0; 2661 detobj.colliderType = 0;
@@ -2679,10 +2668,10 @@ namespace OpenSim.Region.Framework.Scenes
2679 { 2668 {
2680 LandEndCollidingMessage.Colliders = colliding; 2669 LandEndCollidingMessage.Colliders = colliding;
2681 2670
2682 if (m_parentGroup.Scene == null) 2671 if (ParentGroup.Scene == null)
2683 return; 2672 return;
2684 2673
2685 m_parentGroup.Scene.EventManager.TriggerScriptLandCollidingEnd(LocalId, LandEndCollidingMessage); 2674 ParentGroup.Scene.EventManager.TriggerScriptLandCollidingEnd(LocalId, LandEndCollidingMessage);
2686 } 2675 }
2687 } 2676 }
2688 } 2677 }
@@ -2694,7 +2683,7 @@ namespace OpenSim.Region.Framework.Scenes
2694 2683
2695 RemFlag(PrimFlags.Physics); 2684 RemFlag(PrimFlags.Physics);
2696 DoPhysicsPropertyUpdate(false, true); 2685 DoPhysicsPropertyUpdate(false, true);
2697 //m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); 2686 //ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
2698 } 2687 }
2699 2688
2700 public void PhysicsRequestingTerseUpdate() 2689 public void PhysicsRequestingTerseUpdate()
@@ -2703,15 +2692,15 @@ namespace OpenSim.Region.Framework.Scenes
2703 { 2692 {
2704 Vector3 newpos = new Vector3(PhysActor.Position.GetBytes(), 0); 2693 Vector3 newpos = new Vector3(PhysActor.Position.GetBytes(), 0);
2705 2694
2706 if (m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.N) 2695 if (ParentGroup.Scene.TestBorderCross(newpos, Cardinals.N)
2707 | m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.S) 2696 | ParentGroup.Scene.TestBorderCross(newpos, Cardinals.S)
2708 | m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.E) 2697 | ParentGroup.Scene.TestBorderCross(newpos, Cardinals.E)
2709 | m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.W)) 2698 | ParentGroup.Scene.TestBorderCross(newpos, Cardinals.W))
2710 { 2699 {
2711 m_parentGroup.AbsolutePosition = newpos; 2700 ParentGroup.AbsolutePosition = newpos;
2712 return; 2701 return;
2713 } 2702 }
2714 //m_parentGroup.RootPart.m_groupPosition = newpos; 2703 //ParentGroup.RootPart.m_groupPosition = newpos;
2715 } 2704 }
2716 ScheduleTerseUpdate(); 2705 ScheduleTerseUpdate();
2717 2706
@@ -2743,7 +2732,7 @@ namespace OpenSim.Region.Framework.Scenes
2743 TaskInventory.LockItemsForRead(false); 2732 TaskInventory.LockItemsForRead(false);
2744 } 2733 }
2745 2734
2746 m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence sp) 2735 ParentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence sp)
2747 { 2736 {
2748 if (!(Util.GetDistanceTo(sp.AbsolutePosition, AbsolutePosition) >= 100)) 2737 if (!(Util.GetDistanceTo(sp.AbsolutePosition, AbsolutePosition) >= 100))
2749 sp.ControllingClient.SendPreLoadSound(objectID, objectID, soundID); 2738 sp.ControllingClient.SendPreLoadSound(objectID, objectID, soundID);
@@ -2828,7 +2817,7 @@ namespace OpenSim.Region.Framework.Scenes
2828 2817
2829 public void rotLookAt(Quaternion target, float strength, float damping) 2818 public void rotLookAt(Quaternion target, float strength, float damping)
2830 { 2819 {
2831 if (m_parentGroup.IsAttachment) 2820 if (ParentGroup.IsAttachment)
2832 { 2821 {
2833 /* 2822 /*
2834 ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar); 2823 ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar);
@@ -2864,10 +2853,10 @@ namespace OpenSim.Region.Framework.Scenes
2864 { 2853 {
2865// m_log.DebugFormat("[SCENE OBJECT PART]: Scheduling full update for {0} {1}", Name, LocalId); 2854// m_log.DebugFormat("[SCENE OBJECT PART]: Scheduling full update for {0} {1}", Name, LocalId);
2866 2855
2867 if (m_parentGroup == null) 2856 if (ParentGroup == null)
2868 return; 2857 return;
2869 2858
2870 m_parentGroup.QueueForUpdateCheck(); 2859 ParentGroup.QueueForUpdateCheck();
2871 2860
2872 int timeNow = Util.UnixTimeSinceEpoch(); 2861 int timeNow = Util.UnixTimeSinceEpoch();
2873 2862
@@ -2896,13 +2885,13 @@ namespace OpenSim.Region.Framework.Scenes
2896 /// </summary> 2885 /// </summary>
2897 public void ScheduleTerseUpdate() 2886 public void ScheduleTerseUpdate()
2898 { 2887 {
2899 if (m_parentGroup == null) 2888 if (ParentGroup == null)
2900 return; 2889 return;
2901 2890
2902 if (UpdateFlag == UpdateRequired.NONE) 2891 if (UpdateFlag == UpdateRequired.NONE)
2903 { 2892 {
2904 m_parentGroup.HasGroupChanged = true; 2893 ParentGroup.HasGroupChanged = true;
2905 m_parentGroup.QueueForUpdateCheck(); 2894 ParentGroup.QueueForUpdateCheck();
2906 2895
2907 TimeStampTerse = (uint) Util.UnixTimeSinceEpoch(); 2896 TimeStampTerse = (uint) Util.UnixTimeSinceEpoch();
2908 UpdateFlag = UpdateRequired.TERSE; 2897 UpdateFlag = UpdateRequired.TERSE;
@@ -2915,7 +2904,7 @@ namespace OpenSim.Region.Framework.Scenes
2915 2904
2916 public void ScriptSetPhysicsStatus(bool UsePhysics) 2905 public void ScriptSetPhysicsStatus(bool UsePhysics)
2917 { 2906 {
2918 m_parentGroup.ScriptSetPhysicsStatus(UsePhysics); 2907 ParentGroup.ScriptSetPhysicsStatus(UsePhysics);
2919 } 2908 }
2920 2909
2921 /// <summary> 2910 /// <summary>
@@ -2942,7 +2931,7 @@ namespace OpenSim.Region.Framework.Scenes
2942 // Update the physics actor with the new loaded sculpt data and set the taint signal. 2931 // Update the physics actor with the new loaded sculpt data and set the taint signal.
2943 PhysActor.Shape = m_shape; 2932 PhysActor.Shape = m_shape;
2944 2933
2945 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); 2934 ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
2946 } 2935 }
2947 } 2936 }
2948 } 2937 }
@@ -2955,7 +2944,7 @@ namespace OpenSim.Region.Framework.Scenes
2955 /// <param name="clientFlags"></param> 2944 /// <param name="clientFlags"></param>
2956 protected internal void SendFullUpdate(IClientAPI remoteClient, uint clientFlags) 2945 protected internal void SendFullUpdate(IClientAPI remoteClient, uint clientFlags)
2957 { 2946 {
2958 if (m_parentGroup == null) 2947 if (ParentGroup == null)
2959 return; 2948 return;
2960 2949
2961// m_log.DebugFormat( 2950// m_log.DebugFormat(
@@ -2963,7 +2952,7 @@ namespace OpenSim.Region.Framework.Scenes
2963 2952
2964 if (IsRoot) 2953 if (IsRoot)
2965 { 2954 {
2966 if (m_parentGroup.IsAttachment) 2955 if (ParentGroup.IsAttachment)
2967 { 2956 {
2968 SendFullUpdateToClient(remoteClient, AttachedPos, clientFlags); 2957 SendFullUpdateToClient(remoteClient, AttachedPos, clientFlags);
2969 } 2958 }
@@ -2983,10 +2972,10 @@ namespace OpenSim.Region.Framework.Scenes
2983 /// </summary> 2972 /// </summary>
2984 public void SendFullUpdateToAllClients() 2973 public void SendFullUpdateToAllClients()
2985 { 2974 {
2986 if (m_parentGroup == null) 2975 if (ParentGroup == null)
2987 return; 2976 return;
2988 2977
2989 m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) 2978 ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
2990 { 2979 {
2991 SendFullUpdate(avatar.ControllingClient, avatar.GenerateClientFlags(UUID)); 2980 SendFullUpdate(avatar.ControllingClient, avatar.GenerateClientFlags(UUID));
2992 }); 2981 });
@@ -2998,10 +2987,10 @@ namespace OpenSim.Region.Framework.Scenes
2998 /// <param name="agentID"></param> 2987 /// <param name="agentID"></param>
2999 public void SendFullUpdateToAllClientsExcept(UUID agentID) 2988 public void SendFullUpdateToAllClientsExcept(UUID agentID)
3000 { 2989 {
3001 if (m_parentGroup == null) 2990 if (ParentGroup == null)
3002 return; 2991 return;
3003 2992
3004 m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) 2993 ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
3005 { 2994 {
3006 // Ugly reference :( 2995 // Ugly reference :(
3007 if (avatar.UUID != agentID) 2996 if (avatar.UUID != agentID)
@@ -3046,7 +3035,7 @@ namespace OpenSim.Region.Framework.Scenes
3046 3035
3047 clientFlags &= ~(uint) PrimFlags.CreateSelected; 3036 clientFlags &= ~(uint) PrimFlags.CreateSelected;
3048 3037
3049 if (remoteClient.AgentId == _ownerID) 3038 if (remoteClient.AgentId == OwnerID)
3050 { 3039 {
3051 if ((Flags & PrimFlags.CreateSelected) != 0) 3040 if ((Flags & PrimFlags.CreateSelected) != 0)
3052 { 3041 {
@@ -3122,13 +3111,13 @@ namespace OpenSim.Region.Framework.Scenes
3122 if (volume < 0) 3111 if (volume < 0)
3123 volume = 0; 3112 volume = 0;
3124 3113
3125 UUID ownerID = _ownerID; 3114 UUID ownerID = OwnerID;
3126 UUID objectID = ParentGroup.RootPart.UUID; 3115 UUID objectID = ParentGroup.RootPart.UUID;
3127 UUID parentID = ParentGroup.UUID; 3116 UUID parentID = ParentGroup.UUID;
3128 3117
3129 UUID soundID = UUID.Zero; 3118 UUID soundID = UUID.Zero;
3130 Vector3 position = AbsolutePosition; // region local 3119 Vector3 position = AbsolutePosition; // region local
3131 ulong regionHandle = m_parentGroup.Scene.RegionInfo.RegionHandle; 3120 ulong regionHandle = ParentGroup.Scene.RegionInfo.RegionHandle;
3132 3121
3133 if (!UUID.TryParse(sound, out soundID)) 3122 if (!UUID.TryParse(sound, out soundID))
3134 { 3123 {
@@ -3148,7 +3137,7 @@ namespace OpenSim.Region.Framework.Scenes
3148 if (soundID == UUID.Zero) 3137 if (soundID == UUID.Zero)
3149 return; 3138 return;
3150 3139
3151 ISoundModule soundModule = m_parentGroup.Scene.RequestModuleInterface<ISoundModule>(); 3140 ISoundModule soundModule = ParentGroup.Scene.RequestModuleInterface<ISoundModule>();
3152 if (soundModule != null) 3141 if (soundModule != null)
3153 { 3142 {
3154 if (useMaster) 3143 if (useMaster)
@@ -3160,7 +3149,7 @@ namespace OpenSim.Region.Framework.Scenes
3160 else 3149 else
3161 soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius); 3150 soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius);
3162 ParentGroup.PlaySoundMasterPrim = this; 3151 ParentGroup.PlaySoundMasterPrim = this;
3163 ownerID = _ownerID; 3152 ownerID = OwnerID;
3164 objectID = ParentGroup.RootPart.UUID; 3153 objectID = ParentGroup.RootPart.UUID;
3165 parentID = ParentGroup.UUID; 3154 parentID = ParentGroup.UUID;
3166 position = AbsolutePosition; // region local 3155 position = AbsolutePosition; // region local
@@ -3171,7 +3160,7 @@ namespace OpenSim.Region.Framework.Scenes
3171 soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius); 3160 soundModule.PlayAttachedSound(soundID, ownerID, objectID, volume, position, flags, radius);
3172 foreach (SceneObjectPart prim in ParentGroup.PlaySoundSlavePrims) 3161 foreach (SceneObjectPart prim in ParentGroup.PlaySoundSlavePrims)
3173 { 3162 {
3174 ownerID = prim._ownerID; 3163 ownerID = prim.OwnerID;
3175 objectID = prim.ParentGroup.RootPart.UUID; 3164 objectID = prim.ParentGroup.RootPart.UUID;
3176 parentID = prim.ParentGroup.UUID; 3165 parentID = prim.ParentGroup.UUID;
3177 position = prim.AbsolutePosition; // region local 3166 position = prim.AbsolutePosition; // region local
@@ -3204,7 +3193,7 @@ namespace OpenSim.Region.Framework.Scenes
3204 /// </summary> 3193 /// </summary>
3205 public void SendTerseUpdateToAllClients() 3194 public void SendTerseUpdateToAllClients()
3206 { 3195 {
3207 m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) 3196 ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
3208 { 3197 {
3209 SendTerseUpdateToClient(avatar.ControllingClient); 3198 SendTerseUpdateToClient(avatar.ControllingClient);
3210 }); 3199 });
@@ -3212,7 +3201,7 @@ namespace OpenSim.Region.Framework.Scenes
3212 3201
3213 public void SetAxisRotation(int axis, int rotate) 3202 public void SetAxisRotation(int axis, int rotate)
3214 { 3203 {
3215 m_parentGroup.SetAxisRotation(axis, rotate); 3204 ParentGroup.SetAxisRotation(axis, rotate);
3216 3205
3217 //Cannot use ScriptBaseClass constants as no referance to it currently. 3206 //Cannot use ScriptBaseClass constants as no referance to it currently.
3218 if (axis == 2)//STATUS_ROTATE_X 3207 if (axis == 2)//STATUS_ROTATE_X
@@ -3235,10 +3224,10 @@ namespace OpenSim.Region.Framework.Scenes
3235 3224
3236 public void SetDieAtEdge(bool p) 3225 public void SetDieAtEdge(bool p)
3237 { 3226 {
3238 if (m_parentGroup.IsDeleted) 3227 if (ParentGroup.IsDeleted)
3239 return; 3228 return;
3240 3229
3241 m_parentGroup.RootPart.DIE_AT_EDGE = p; 3230 ParentGroup.RootPart.DIE_AT_EDGE = p;
3242 } 3231 }
3243 3232
3244 public void SetFloatOnWater(int floatYN) 3233 public void SetFloatOnWater(int floatYN)
@@ -3480,7 +3469,7 @@ namespace OpenSim.Region.Framework.Scenes
3480 3469
3481 public void SetGroup(UUID groupID, IClientAPI client) 3470 public void SetGroup(UUID groupID, IClientAPI client)
3482 { 3471 {
3483 _groupID = groupID; 3472 GroupID = groupID;
3484 if (client != null) 3473 if (client != null)
3485 SendPropertiesToClient(client); 3474 SendPropertiesToClient(client);
3486 UpdateFlag = UpdateRequired.FULL; 3475 UpdateFlag = UpdateRequired.FULL;
@@ -3491,13 +3480,13 @@ namespace OpenSim.Region.Framework.Scenes
3491 /// </summary> 3480 /// </summary>
3492 public void SetParent(SceneObjectGroup parent) 3481 public void SetParent(SceneObjectGroup parent)
3493 { 3482 {
3494 m_parentGroup = parent; 3483 ParentGroup = parent;
3495 } 3484 }
3496 3485
3497 // Use this for attachments! LocalID should be avatar's localid 3486 // Use this for attachments! LocalID should be avatar's localid
3498 public void SetParentLocalId(uint localID) 3487 public void SetParentLocalId(uint localID)
3499 { 3488 {
3500 _parentID = localID; 3489 ParentID = localID;
3501 } 3490 }
3502 3491
3503 public void SetPhysicsAxisRotation() 3492 public void SetPhysicsAxisRotation()
@@ -3505,7 +3494,7 @@ namespace OpenSim.Region.Framework.Scenes
3505 if (PhysActor != null) 3494 if (PhysActor != null)
3506 { 3495 {
3507 PhysActor.LockAngularMotion(RotationAxis); 3496 PhysActor.LockAngularMotion(RotationAxis);
3508 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); 3497 ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
3509 } 3498 }
3510 } 3499 }
3511 3500
@@ -3553,9 +3542,9 @@ namespace OpenSim.Region.Framework.Scenes
3553 3542
3554 public void StopLookAt() 3543 public void StopLookAt()
3555 { 3544 {
3556 m_parentGroup.stopLookAt(); // This calls method in SceneObjectGroup. 3545 ParentGroup.stopLookAt();
3557 3546
3558 m_parentGroup.ScheduleGroupForTerseUpdate(); 3547 ParentGroup.ScheduleGroupForTerseUpdate();
3559 } 3548 }
3560 3549
3561 /// <summary> 3550 /// <summary>
@@ -3575,10 +3564,10 @@ namespace OpenSim.Region.Framework.Scenes
3575 3564
3576 public void StopMoveToTarget() 3565 public void StopMoveToTarget()
3577 { 3566 {
3578 m_parentGroup.stopMoveToTarget(); 3567 ParentGroup.stopMoveToTarget();
3579 3568
3580 m_parentGroup.ScheduleGroupForTerseUpdate(); 3569 ParentGroup.ScheduleGroupForTerseUpdate();
3581 //m_parentGroup.ScheduleGroupForFullUpdate(); 3570 //ParentGroup.ScheduleGroupForFullUpdate();
3582 } 3571 }
3583 3572
3584 public void StoreUndoState() 3573 public void StoreUndoState()
@@ -3612,12 +3601,12 @@ namespace OpenSim.Region.Framework.Scenes
3612 } 3601 }
3613 } 3602 }
3614 } 3603 }
3615 3604
3616 // m_log.DebugFormat( 3605 // m_log.DebugFormat(
3617 // "[SCENE OBJECT PART]: Storing undo state for {0} {1}, forGroup {2}, initial stack size {3}", 3606 // "[SCENE OBJECT PART]: Storing undo state for {0} {1}, forGroup {2}, initial stack size {3}",
3618 // Name, LocalId, forGroup, m_undo.Count); 3607 // Name, LocalId, forGroup, m_undo.Count);
3619 3608
3620 if (m_parentGroup.GetSceneMaxUndo() > 0) 3609 if (ParentGroup.GetSceneMaxUndo() > 0)
3621 { 3610 {
3622 UndoState nUndo = new UndoState(this, forGroup); 3611 UndoState nUndo = new UndoState(this, forGroup);
3623 3612
@@ -3673,7 +3662,7 @@ namespace OpenSim.Region.Framework.Scenes
3673 { 3662 {
3674 UndoState nUndo = null; 3663 UndoState nUndo = null;
3675 3664
3676 if (m_parentGroup.GetSceneMaxUndo() > 0) 3665 if (ParentGroup.GetSceneMaxUndo() > 0)
3677 { 3666 {
3678 nUndo = new UndoState(this, goback.ForGroup); 3667 nUndo = new UndoState(this, goback.ForGroup);
3679 } 3668 }
@@ -3705,7 +3694,7 @@ namespace OpenSim.Region.Framework.Scenes
3705 3694
3706 if (gofwd != null) 3695 if (gofwd != null)
3707 { 3696 {
3708 if (m_parentGroup.GetSceneMaxUndo() > 0) 3697 if (ParentGroup.GetSceneMaxUndo() > 0)
3709 { 3698 {
3710 UndoState nUndo = new UndoState(this, gofwd.ForGroup); 3699 UndoState nUndo = new UndoState(this, gofwd.ForGroup);
3711 3700
@@ -4180,17 +4169,17 @@ namespace OpenSim.Region.Framework.Scenes
4180 4169
4181 public void TriggerScriptChangedEvent(Changed val) 4170 public void TriggerScriptChangedEvent(Changed val)
4182 { 4171 {
4183 if (m_parentGroup != null && m_parentGroup.Scene != null) 4172 if (ParentGroup != null && ParentGroup.Scene != null)
4184 m_parentGroup.Scene.EventManager.TriggerOnScriptChangedEvent(LocalId, (uint)val); 4173 ParentGroup.Scene.EventManager.TriggerOnScriptChangedEvent(LocalId, (uint)val);
4185 } 4174 }
4186 4175
4187 public void TrimPermissions() 4176 public void TrimPermissions()
4188 { 4177 {
4189 _baseMask &= (uint)PermissionMask.All; 4178 BaseMask &= (uint)PermissionMask.All;
4190 _ownerMask &= (uint)PermissionMask.All; 4179 OwnerMask &= (uint)PermissionMask.All;
4191 _groupMask &= (uint)PermissionMask.All; 4180 GroupMask &= (uint)PermissionMask.All;
4192 _everyoneMask &= (uint)PermissionMask.All; 4181 EveryoneMask &= (uint)PermissionMask.All;
4193 _nextOwnerMask &= (uint)PermissionMask.All; 4182 NextOwnerMask &= (uint)PermissionMask.All;
4194 } 4183 }
4195 4184
4196 public void UpdateExtraParam(ushort type, bool inUse, byte[] data) 4185 public void UpdateExtraParam(ushort type, bool inUse, byte[] data)
@@ -4201,7 +4190,7 @@ namespace OpenSim.Region.Framework.Scenes
4201 { 4190 {
4202 if (m_shape.SculptEntry && m_shape.SculptTexture != UUID.Zero) 4191 if (m_shape.SculptEntry && m_shape.SculptTexture != UUID.Zero)
4203 { 4192 {
4204 m_parentGroup.Scene.AssetService.Get(m_shape.SculptTexture.ToString(), this, AssetReceived); 4193 ParentGroup.Scene.AssetService.Get(m_shape.SculptTexture.ToString(), this, AssetReceived);
4205 } 4194 }
4206 } 4195 }
4207 4196
@@ -4264,46 +4253,46 @@ namespace OpenSim.Region.Framework.Scenes
4264 public void UpdatePermissions(UUID AgentID, byte field, uint localID, uint mask, byte addRemTF) 4253 public void UpdatePermissions(UUID AgentID, byte field, uint localID, uint mask, byte addRemTF)
4265 { 4254 {
4266 bool set = addRemTF == 1; 4255 bool set = addRemTF == 1;
4267 bool god = m_parentGroup.Scene.Permissions.IsGod(AgentID); 4256 bool god = ParentGroup.Scene.Permissions.IsGod(AgentID);
4268 4257
4269 uint baseMask = _baseMask; 4258 uint baseMask = BaseMask;
4270 if (god) 4259 if (god)
4271 baseMask = 0x7ffffff0; 4260 baseMask = 0x7ffffff0;
4272 4261
4273 // Are we the owner? 4262 // Are we the owner?
4274 if ((AgentID == _ownerID) || god) 4263 if ((AgentID == OwnerID) || god)
4275 { 4264 {
4276 switch (field) 4265 switch (field)
4277 { 4266 {
4278 case 1: 4267 case 1:
4279 if (god) 4268 if (god)
4280 { 4269 {
4281 _baseMask = ApplyMask(_baseMask, set, mask); 4270 BaseMask = ApplyMask(BaseMask, set, mask);
4282 Inventory.ApplyGodPermissions(_baseMask); 4271 Inventory.ApplyGodPermissions(_baseMask);
4283 } 4272 }
4284 4273
4285 break; 4274 break;
4286 case 2: 4275 case 2:
4287 _ownerMask = ApplyMask(_ownerMask, set, mask) & 4276 OwnerMask = ApplyMask(OwnerMask, set, mask) &
4288 baseMask; 4277 baseMask;
4289 break; 4278 break;
4290 case 4: 4279 case 4:
4291 _groupMask = ApplyMask(_groupMask, set, mask) & 4280 GroupMask = ApplyMask(GroupMask, set, mask) &
4292 baseMask; 4281 baseMask;
4293 break; 4282 break;
4294 case 8: 4283 case 8:
4295 _everyoneMask = ApplyMask(_everyoneMask, set, mask) & 4284 EveryoneMask = ApplyMask(EveryoneMask, set, mask) &
4296 baseMask; 4285 baseMask;
4297 break; 4286 break;
4298 case 16: 4287 case 16:
4299 _nextOwnerMask = ApplyMask(_nextOwnerMask, set, mask) & 4288 NextOwnerMask = ApplyMask(NextOwnerMask, set, mask) &
4300 baseMask; 4289 baseMask;
4301 // Prevent the client from creating no mod, no copy 4290 // Prevent the client from creating no mod, no copy
4302 // objects 4291 // objects
4303 if ((_nextOwnerMask & (uint)PermissionMask.Copy) == 0) 4292 if ((NextOwnerMask & (uint)PermissionMask.Copy) == 0)
4304 _nextOwnerMask |= (uint)PermissionMask.Transfer; 4293 NextOwnerMask |= (uint)PermissionMask.Transfer;
4305 4294
4306 _nextOwnerMask |= (uint)PermissionMask.Move; 4295 NextOwnerMask |= (uint)PermissionMask.Move;
4307 4296
4308 break; 4297 break;
4309 } 4298 }
@@ -4317,7 +4306,7 @@ namespace OpenSim.Region.Framework.Scenes
4317 // For now, we use the NINJA naming scheme for identifying joints. 4306 // For now, we use the NINJA naming scheme for identifying joints.
4318 // In the future, we can support other joint specification schemes such as a 4307 // In the future, we can support other joint specification schemes such as a
4319 // custom checkbox in the viewer GUI. 4308 // custom checkbox in the viewer GUI.
4320 if (m_parentGroup.Scene.PhysicsScene.SupportsNINJAJoints) 4309 if (ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
4321 { 4310 {
4322 string hingeString = "hingejoint"; 4311 string hingeString = "hingejoint";
4323 return (Name.Length >= hingeString.Length && Name.Substring(0, hingeString.Length) == hingeString); 4312 return (Name.Length >= hingeString.Length && Name.Substring(0, hingeString.Length) == hingeString);
@@ -4333,7 +4322,7 @@ namespace OpenSim.Region.Framework.Scenes
4333 // For now, we use the NINJA naming scheme for identifying joints. 4322 // For now, we use the NINJA naming scheme for identifying joints.
4334 // In the future, we can support other joint specification schemes such as a 4323 // In the future, we can support other joint specification schemes such as a
4335 // custom checkbox in the viewer GUI. 4324 // custom checkbox in the viewer GUI.
4336 if (m_parentGroup.Scene.PhysicsScene.SupportsNINJAJoints) 4325 if (ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
4337 { 4326 {
4338 string ballString = "balljoint"; 4327 string ballString = "balljoint";
4339 return (Name.Length >= ballString.Length && Name.Substring(0, ballString.Length) == ballString); 4328 return (Name.Length >= ballString.Length && Name.Substring(0, ballString.Length) == ballString);
@@ -4349,7 +4338,7 @@ namespace OpenSim.Region.Framework.Scenes
4349 // For now, we use the NINJA naming scheme for identifying joints. 4338 // For now, we use the NINJA naming scheme for identifying joints.
4350 // In the future, we can support other joint specification schemes such as a 4339 // In the future, we can support other joint specification schemes such as a
4351 // custom checkbox in the viewer GUI. 4340 // custom checkbox in the viewer GUI.
4352 if (m_parentGroup.Scene.PhysicsScene.SupportsNINJAJoints) 4341 if (ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
4353 { 4342 {
4354 return IsHingeJoint() || IsBallJoint(); 4343 return IsHingeJoint() || IsBallJoint();
4355 } 4344 }
@@ -4415,11 +4404,11 @@ namespace OpenSim.Region.Framework.Scenes
4415 { 4404 {
4416 DoPhysicsPropertyUpdate(UsePhysics, false); 4405 DoPhysicsPropertyUpdate(UsePhysics, false);
4417 4406
4418 if (!m_parentGroup.IsDeleted) 4407 if (!ParentGroup.IsDeleted)
4419 { 4408 {
4420 if (LocalId == m_parentGroup.RootPart.LocalId) 4409 if (LocalId == ParentGroup.RootPart.LocalId)
4421 { 4410 {
4422 m_parentGroup.CheckSculptAndLoad(); 4411 ParentGroup.CheckSculptAndLoad();
4423 } 4412 }
4424 } 4413 }
4425 } 4414 }
@@ -4452,7 +4441,7 @@ namespace OpenSim.Region.Framework.Scenes
4452 if (PhysActor == null) 4441 if (PhysActor == null)
4453 { 4442 {
4454 // It's not phantom anymore. So make sure the physics engine get's knowledge of it 4443 // It's not phantom anymore. So make sure the physics engine get's knowledge of it
4455 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( 4444 PhysActor = ParentGroup.Scene.PhysicsScene.AddPrimShape(
4456 string.Format("{0}/{1}", Name, UUID), 4445 string.Format("{0}/{1}", Name, UUID),
4457 Shape, 4446 Shape,
4458 AbsolutePosition, 4447 AbsolutePosition,
@@ -4464,11 +4453,11 @@ namespace OpenSim.Region.Framework.Scenes
4464 PhysActor.SetMaterial(Material); 4453 PhysActor.SetMaterial(Material);
4465 DoPhysicsPropertyUpdate(UsePhysics, true); 4454 DoPhysicsPropertyUpdate(UsePhysics, true);
4466 4455
4467 if (!m_parentGroup.IsDeleted) 4456 if (!ParentGroup.IsDeleted)
4468 { 4457 {
4469 if (LocalId == m_parentGroup.RootPart.LocalId) 4458 if (LocalId == ParentGroup.RootPart.LocalId)
4470 { 4459 {
4471 m_parentGroup.CheckSculptAndLoad(); 4460 ParentGroup.CheckSculptAndLoad();
4472 } 4461 }
4473 } 4462 }
4474 4463
@@ -4490,11 +4479,11 @@ namespace OpenSim.Region.Framework.Scenes
4490 { 4479 {
4491 DoPhysicsPropertyUpdate(UsePhysics, false); // Update physical status. If it's phantom this will remove the prim 4480 DoPhysicsPropertyUpdate(UsePhysics, false); // Update physical status. If it's phantom this will remove the prim
4492 4481
4493 if (!m_parentGroup.IsDeleted) 4482 if (!ParentGroup.IsDeleted)
4494 { 4483 {
4495 if (LocalId == m_parentGroup.RootPart.LocalId) 4484 if (LocalId == ParentGroup.RootPart.LocalId)
4496 { 4485 {
4497 m_parentGroup.CheckSculptAndLoad(); 4486 ParentGroup.CheckSculptAndLoad();
4498 } 4487 }
4499 } 4488 }
4500 } 4489 }
@@ -4606,7 +4595,7 @@ namespace OpenSim.Region.Framework.Scenes
4606 if (PhysActor != null) 4595 if (PhysActor != null)
4607 { 4596 {
4608 PhysActor.Shape = m_shape; 4597 PhysActor.Shape = m_shape;
4609 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); 4598 ParentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
4610 } 4599 }
4611 4600
4612 // This is what makes vehicle trailers work 4601 // This is what makes vehicle trailers work
@@ -4768,18 +4757,18 @@ namespace OpenSim.Region.Framework.Scenes
4768 4757
4769 //if ((GetEffectiveObjectFlags() & (uint)PrimFlags.Scripted) != 0) 4758 //if ((GetEffectiveObjectFlags() & (uint)PrimFlags.Scripted) != 0)
4770 //{ 4759 //{
4771 // m_parentGroup.Scene.EventManager.OnScriptTimerEvent += handleTimerAccounting; 4760 // ParentGroup.Scene.EventManager.OnScriptTimerEvent += handleTimerAccounting;
4772 //} 4761 //}
4773 //else 4762 //else
4774 //{ 4763 //{
4775 // m_parentGroup.Scene.EventManager.OnScriptTimerEvent -= handleTimerAccounting; 4764 // ParentGroup.Scene.EventManager.OnScriptTimerEvent -= handleTimerAccounting;
4776 //} 4765 //}
4777 4766
4778 LocalFlags = (PrimFlags)objectflagupdate; 4767 LocalFlags = (PrimFlags)objectflagupdate;
4779 4768
4780 if (m_parentGroup != null && m_parentGroup.RootPart == this) 4769 if (ParentGroup != null && ParentGroup.RootPart == this)
4781 { 4770 {
4782 m_parentGroup.aggregateScriptEvents(); 4771 ParentGroup.aggregateScriptEvents();
4783 } 4772 }
4784 else 4773 else
4785 { 4774 {
@@ -4847,14 +4836,14 @@ namespace OpenSim.Region.Framework.Scenes
4847 4836
4848 public void AddScriptLPS(int count) 4837 public void AddScriptLPS(int count)
4849 { 4838 {
4850 m_parentGroup.AddScriptLPS(count); 4839 ParentGroup.AddScriptLPS(count);
4851 } 4840 }
4852 4841
4853 public void ApplyNextOwnerPermissions() 4842 public void ApplyNextOwnerPermissions()
4854 { 4843 {
4855 _baseMask &= _nextOwnerMask; 4844 BaseMask &= NextOwnerMask;
4856 _ownerMask &= _nextOwnerMask; 4845 OwnerMask &= NextOwnerMask;
4857 _everyoneMask &= _nextOwnerMask; 4846 EveryoneMask &= NextOwnerMask;
4858 4847
4859 Inventory.ApplyNextOwnerPermissions(); 4848 Inventory.ApplyNextOwnerPermissions();
4860 } 4849 }