diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 1a32460..50dc2ae 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -247,9 +247,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
247 | public SceneObjectGroup(Scene scene, ulong regionHandle, SceneObjectPart part) | 247 | public SceneObjectGroup(Scene scene, ulong regionHandle, SceneObjectPart part) |
248 | { | 248 | { |
249 | m_scene = scene; | 249 | m_scene = scene; |
250 | |||
250 | part.SetParent(this); | 251 | part.SetParent(this); |
251 | part.ParentID = 0; | 252 | part.ParentID = 0; |
252 | part.LinkNum = 0; | 253 | part.LinkNum = 0; |
254 | |||
253 | m_parts.Add(part.UUID, part); | 255 | m_parts.Add(part.UUID, part); |
254 | 256 | ||
255 | SetPartAsRoot(part); | 257 | SetPartAsRoot(part); |
@@ -691,7 +693,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
691 | #region Scheduling | 693 | #region Scheduling |
692 | 694 | ||
693 | /// <summary> | 695 | /// <summary> |
694 | /// | 696 | /// Examine this object's parts to see if they've changed sufficiently to warrant an update |
695 | /// </summary> | 697 | /// </summary> |
696 | public override void Update() | 698 | public override void Update() |
697 | { | 699 | { |
@@ -703,6 +705,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
703 | } | 705 | } |
704 | lastPhysGroupPos = AbsolutePosition; | 706 | lastPhysGroupPos = AbsolutePosition; |
705 | } | 707 | } |
708 | |||
706 | if ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1) | 709 | if ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1) |
707 | || (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1) | 710 | || (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1) |
708 | || (Math.Abs(lastPhysGroupRot.Y - GroupRotation.Y) > 0.1) | 711 | || (Math.Abs(lastPhysGroupRot.Y - GroupRotation.Y) > 0.1) |
@@ -714,6 +717,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
714 | } | 717 | } |
715 | lastPhysGroupRot = GroupRotation; | 718 | lastPhysGroupRot = GroupRotation; |
716 | } | 719 | } |
720 | |||
717 | foreach (SceneObjectPart part in m_parts.Values) | 721 | foreach (SceneObjectPart part in m_parts.Values) |
718 | { | 722 | { |
719 | part.SendScheduledUpdates(); | 723 | part.SendScheduledUpdates(); |
@@ -737,7 +741,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
737 | } | 741 | } |
738 | 742 | ||
739 | /// <summary> | 743 | /// <summary> |
740 | /// | 744 | /// Schedule a full update for every part in this object |
741 | /// </summary> | 745 | /// </summary> |
742 | public void ScheduleGroupForFullUpdate() | 746 | public void ScheduleGroupForFullUpdate() |
743 | { | 747 | { |
@@ -910,6 +914,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
910 | linkPart.RotationOffset = new LLQuaternion(newRot.x, newRot.y, newRot.z, newRot.w); | 914 | linkPart.RotationOffset = new LLQuaternion(newRot.x, newRot.y, newRot.z, newRot.w); |
911 | 915 | ||
912 | linkPart.ParentID = m_rootPart.LocalId; | 916 | linkPart.ParentID = m_rootPart.LocalId; |
917 | |||
913 | linkPart.LinkNum = m_parts.Count; | 918 | linkPart.LinkNum = m_parts.Count; |
914 | 919 | ||
915 | m_parts.Add(linkPart.UUID, linkPart); | 920 | m_parts.Add(linkPart.UUID, linkPart); |
@@ -1015,7 +1020,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1015 | //m_rootPart.DoPhysicsPropertyUpdate(m_rootPart.PhysActor.IsPhysical, true); | 1020 | //m_rootPart.DoPhysicsPropertyUpdate(m_rootPart.PhysActor.IsPhysical, true); |
1016 | //} | 1021 | //} |
1017 | 1022 | ||
1018 | SceneObjectGroup objectGroup = new SceneObjectGroup(m_scene, m_regionHandle, linkPart); | 1023 | SceneObjectGroup objectGroup = new SceneObjectGroup(m_scene, m_regionHandle, linkPart); |
1019 | 1024 | ||
1020 | m_scene.AddEntity(objectGroup); | 1025 | m_scene.AddEntity(objectGroup); |
1021 | 1026 | ||
@@ -1715,6 +1720,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
1715 | m_scene.EventManager.TriggerGroupGrab(UUID, offsetPos, remoteClient.AgentId); | 1720 | m_scene.EventManager.TriggerGroupGrab(UUID, offsetPos, remoteClient.AgentId); |
1716 | } | 1721 | } |
1717 | 1722 | ||
1723 | /// <summary> | ||
1724 | /// Completely delete this group and tell all the scene presences about that deletion. | ||
1725 | /// </summary> | ||
1718 | public void DeleteGroup() | 1726 | public void DeleteGroup() |
1719 | { | 1727 | { |
1720 | DetachFromBackup(this); | 1728 | DetachFromBackup(this); |