diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index dbf493c..5a3dc20 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -469,13 +469,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
469 | return; | 469 | return; |
470 | } | 470 | } |
471 | } | 471 | } |
472 | foreach (SceneObjectPart part in m_parts.Values) | 472 | List<SceneObjectPart> parts = new List<SceneObjectPart>(m_parts.Values); |
473 | lockPartsForRead(false); | ||
474 | foreach (SceneObjectPart part in parts) | ||
473 | { | 475 | { |
474 | part.IgnoreUndoUpdate = false; | 476 | part.IgnoreUndoUpdate = false; |
475 | part.StoreUndoState(UndoType.STATE_GROUP_POSITION); | 477 | part.StoreUndoState(UndoType.STATE_GROUP_POSITION); |
476 | part.GroupPosition = val; | 478 | part.GroupPosition = val; |
477 | } | 479 | } |
478 | lockPartsForRead(false); | 480 | |
481 | foreach (ScenePresence av in m_linkedAvatars) | ||
482 | { | ||
483 | Vector3 offset = m_parts[av.LinkedPrim].GetWorldPosition() - av.ParentPosition; | ||
484 | av.AbsolutePosition += offset; | ||
485 | av.ParentPosition = m_parts[av.LinkedPrim].GetWorldPosition(); //ParentPosition gets cleared by AbsolutePosition | ||
486 | av.SendFullUpdateToAllClients(); | ||
487 | } | ||
479 | 488 | ||
480 | //if (m_rootPart.PhysActor != null) | 489 | //if (m_rootPart.PhysActor != null) |
481 | //{ | 490 | //{ |