diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 45506ed52b..ac13d5ea5f 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -209,7 +209,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer sp.Teleport(position); foreach (SceneObjectGroup grp in sp.GetAttachments()) - sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT); + { + if (grp.IsDeleted) + sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT); + } } else // Another region possibly in another simulator { @@ -326,11 +329,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer if (sp.ParentID != (uint)0) sp.StandUp(); - if (!sp.ValidateAttachments()) - { - sp.ControllingClient.SendTeleportFailed("Inconsistent attachment state"); - return; - } +// if (!sp.ValidateAttachments()) +// { +// sp.ControllingClient.SendTeleportFailed("Inconsistent attachment state"); +// return; +// } string reason; string version; @@ -944,8 +947,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer Scene m_scene = agent.Scene; - if (neighbourRegion != null && agent.ValidateAttachments()) + if (neighbourRegion != null) { + agent.ValidateAttachments(); + pos = pos + (agent.Velocity); SetInTransit(agent.UUID); @@ -1763,16 +1768,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer List m_attachments = sp.GetAttachments(); // Validate - foreach (SceneObjectGroup gobj in m_attachments) - { - if (gobj == null || gobj.IsDeleted) - return false; - } +// foreach (SceneObjectGroup gobj in m_attachments) +// { +// if (gobj == null || gobj.IsDeleted) +// return false; +// } foreach (SceneObjectGroup gobj in m_attachments) { // If the prim group is null then something must have happened to it! - if (gobj != null) + if (gobj != null && !gobj.IsDeleted) { // Set the parent localID to 0 so it transfers over properly. gobj.RootPart.SetParentLocalId(0); diff --git a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs index b20a875139..a14a84b42a 100644 --- a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs @@ -323,7 +323,8 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm List targets = new List(); foreach (SceneObjectGroup sog in attachments) { - targets.Add(sog.UUID); + if (!sog.IsDeleted) + targets.Add(sog.UUID); } // Need to check each attachment diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 1c283c7c2c..f231a390c8 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3498,7 +3498,10 @@ namespace OpenSim.Region.Framework.Scenes m_attachments.Clear(); } - public bool ValidateAttachments() + /// + /// This is currently just being done for information. + /// + public void ValidateAttachments() { lock (m_attachments) { @@ -3508,21 +3511,16 @@ namespace OpenSim.Region.Framework.Scenes if (gobj == null) { m_log.WarnFormat( - "[SCENE PRESENCE]: Failed to validate an attachment for {0} since it was null", Name); - return false; + "[SCENE PRESENCE]: Failed to validate an attachment for {0} since it was null. Continuing", Name); } - - if (gobj.IsDeleted) + else if (gobj.IsDeleted) { m_log.WarnFormat( - "[SCENE PRESENCE]: Failed to validate attachment {0} {1} for {2} since it had been deleted", + "[SCENE PRESENCE]: Failed to validate attachment {0} {1} for {2} since it had been deleted. Continuing", gobj.Name, gobj.UUID, Name); - return false; } } } - - return true; } ///