aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs23
1 files changed, 19 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index a692b33..b367ce4 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -93,6 +93,8 @@ namespace OpenSim.Region.Environment.Scenes
93 private float m_sitAvatarHeight = 2.0f; 93 private float m_sitAvatarHeight = 2.0f;
94 private float m_godlevel = 0; 94 private float m_godlevel = 0;
95 95
96 private bool m_attachmentsTransported = false;
97
96 private bool m_invulnerable = true; 98 private bool m_invulnerable = true;
97 99
98 private LLVector3 m_LastChildAgentUpdatePosition = new LLVector3(); 100 private LLVector3 m_LastChildAgentUpdatePosition = new LLVector3();
@@ -1951,12 +1953,23 @@ namespace OpenSim.Region.Environment.Scenes
1951 { 1953 {
1952 lock (m_attachments) 1954 lock (m_attachments)
1953 { 1955 {
1954 foreach (SceneObjectGroup grp in m_attachments) 1956 if (!m_attachmentsTransported)
1955 { 1957 {
1956 // ControllingClient may be null at this point! 1958 try
1957 m_scene.m_innerScene.DetachSingleAttachmentToInv(grp.GetFromAssetID(), ControllingClient); 1959 {
1960 foreach (SceneObjectGroup grp in m_attachments)
1961 {
1962 // ControllingClient may be null at this point!
1963 m_scene.m_innerScene.DetachSingleAttachmentToInv(grp.GetFromAssetID(), ControllingClient);
1964 }
1965 }
1966 catch (InvalidOperationException)
1967 {
1968 m_log.Info("[CLIENT]: Couldn't save attachments. :(");
1969 }
1970 m_attachments.Clear();
1971
1958 } 1972 }
1959 m_attachments.Clear();
1960 } 1973 }
1961 lock (m_knownPrimUUID) 1974 lock (m_knownPrimUUID)
1962 { 1975 {
@@ -2016,8 +2029,10 @@ namespace OpenSim.Region.Environment.Scenes
2016 2029
2017 public void CrossAttachmentsIntoNewRegion(ulong regionHandle) 2030 public void CrossAttachmentsIntoNewRegion(ulong regionHandle)
2018 { 2031 {
2032 m_attachmentsTransported = true;
2019 lock (m_attachments) 2033 lock (m_attachments)
2020 { 2034 {
2035
2021 foreach (SceneObjectGroup gobj in m_attachments) 2036 foreach (SceneObjectGroup gobj in m_attachments)
2022 { 2037 {
2023 // If the prim group is null then something must have happened to it! 2038 // If the prim group is null then something must have happened to it!