aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs28
1 files changed, 18 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 299effa..48aacfe 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -687,22 +687,30 @@ namespace OpenSim.Region.Framework.Scenes
687 } 687 }
688 } 688 }
689 689
690 // Restuff the new GroupPosition into each SOP of the linkset.
691 // This has the affect of resetting and tainting the physics actors.
692 SceneObjectPart[] parts = m_parts.GetArray();
693 bool triggerScriptEvent = m_rootPart.GroupPosition != val; 690 bool triggerScriptEvent = m_rootPart.GroupPosition != val;
694 if (m_dupeInProgress) 691 if (m_dupeInProgress || IsDeleted)
695 triggerScriptEvent = false; 692 triggerScriptEvent = false;
693
696 m_rootPart.GroupPosition = val; 694 m_rootPart.GroupPosition = val;
697 if (triggerScriptEvent) 695
698 m_rootPart.TriggerScriptChangedEvent(Changed.POSITION); 696 // Restuff the new GroupPosition into each child SOP of the linkset.
697 // this is needed because physics may not have linksets but just loose SOPs in world
698
699 SceneObjectPart[] parts = m_parts.GetArray();
700
699 foreach (SceneObjectPart part in parts) 701 foreach (SceneObjectPart part in parts)
700 { 702 {
701 if (part == m_rootPart) 703 if (part != m_rootPart)
702 continue; 704 part.GroupPosition = val;
703 part.GroupPosition = val; 705 }
704 if (triggerScriptEvent) 706
707 // now that position is changed tell it to scripts
708 if (triggerScriptEvent)
709 {
710 foreach (SceneObjectPart part in parts)
711 {
705 part.TriggerScriptChangedEvent(Changed.POSITION); 712 part.TriggerScriptChangedEvent(Changed.POSITION);
713 }
706 } 714 }
707 715
708/* 716/*