diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 45506ed..ac13d5e 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 | |||
209 | sp.Teleport(position); | 209 | sp.Teleport(position); |
210 | 210 | ||
211 | foreach (SceneObjectGroup grp in sp.GetAttachments()) | 211 | foreach (SceneObjectGroup grp in sp.GetAttachments()) |
212 | sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT); | 212 | { |
213 | if (grp.IsDeleted) | ||
214 | sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT); | ||
215 | } | ||
213 | } | 216 | } |
214 | else // Another region possibly in another simulator | 217 | else // Another region possibly in another simulator |
215 | { | 218 | { |
@@ -326,11 +329,11 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
326 | if (sp.ParentID != (uint)0) | 329 | if (sp.ParentID != (uint)0) |
327 | sp.StandUp(); | 330 | sp.StandUp(); |
328 | 331 | ||
329 | if (!sp.ValidateAttachments()) | 332 | // if (!sp.ValidateAttachments()) |
330 | { | 333 | // { |
331 | sp.ControllingClient.SendTeleportFailed("Inconsistent attachment state"); | 334 | // sp.ControllingClient.SendTeleportFailed("Inconsistent attachment state"); |
332 | return; | 335 | // return; |
333 | } | 336 | // } |
334 | 337 | ||
335 | string reason; | 338 | string reason; |
336 | string version; | 339 | string version; |
@@ -944,8 +947,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
944 | 947 | ||
945 | Scene m_scene = agent.Scene; | 948 | Scene m_scene = agent.Scene; |
946 | 949 | ||
947 | if (neighbourRegion != null && agent.ValidateAttachments()) | 950 | if (neighbourRegion != null) |
948 | { | 951 | { |
952 | agent.ValidateAttachments(); | ||
953 | |||
949 | pos = pos + (agent.Velocity); | 954 | pos = pos + (agent.Velocity); |
950 | 955 | ||
951 | SetInTransit(agent.UUID); | 956 | SetInTransit(agent.UUID); |
@@ -1763,16 +1768,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1763 | List<SceneObjectGroup> m_attachments = sp.GetAttachments(); | 1768 | List<SceneObjectGroup> m_attachments = sp.GetAttachments(); |
1764 | 1769 | ||
1765 | // Validate | 1770 | // Validate |
1766 | foreach (SceneObjectGroup gobj in m_attachments) | 1771 | // foreach (SceneObjectGroup gobj in m_attachments) |
1767 | { | 1772 | // { |
1768 | if (gobj == null || gobj.IsDeleted) | 1773 | // if (gobj == null || gobj.IsDeleted) |
1769 | return false; | 1774 | // return false; |
1770 | } | 1775 | // } |
1771 | 1776 | ||
1772 | foreach (SceneObjectGroup gobj in m_attachments) | 1777 | foreach (SceneObjectGroup gobj in m_attachments) |
1773 | { | 1778 | { |
1774 | // If the prim group is null then something must have happened to it! | 1779 | // If the prim group is null then something must have happened to it! |
1775 | if (gobj != null) | 1780 | if (gobj != null && !gobj.IsDeleted) |
1776 | { | 1781 | { |
1777 | // Set the parent localID to 0 so it transfers over properly. | 1782 | // Set the parent localID to 0 so it transfers over properly. |
1778 | gobj.RootPart.SetParentLocalId(0); | 1783 | gobj.RootPart.SetParentLocalId(0); |