diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 43 |
1 files changed, 28 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index faccab2..25d5e0e 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -59,7 +59,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
59 | get { return m_MaxTransferDistance; } | 59 | get { return m_MaxTransferDistance; } |
60 | set { m_MaxTransferDistance = value; } | 60 | set { m_MaxTransferDistance = value; } |
61 | } | 61 | } |
62 | |||
63 | 62 | ||
64 | protected bool m_Enabled = false; | 63 | protected bool m_Enabled = false; |
65 | protected Scene m_aScene; | 64 | protected Scene m_aScene; |
@@ -68,7 +67,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
68 | private ExpiringCache<UUID, ExpiringCache<ulong, DateTime>> m_bannedRegions = | 67 | private ExpiringCache<UUID, ExpiringCache<ulong, DateTime>> m_bannedRegions = |
69 | new ExpiringCache<UUID, ExpiringCache<ulong, DateTime>>(); | 68 | new ExpiringCache<UUID, ExpiringCache<ulong, DateTime>>(); |
70 | 69 | ||
71 | |||
72 | #region ISharedRegionModule | 70 | #region ISharedRegionModule |
73 | 71 | ||
74 | public Type ReplaceableInterface | 72 | public Type ReplaceableInterface |
@@ -210,7 +208,10 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
210 | sp.Teleport(position); | 208 | sp.Teleport(position); |
211 | 209 | ||
212 | foreach (SceneObjectGroup grp in sp.GetAttachments()) | 210 | foreach (SceneObjectGroup grp in sp.GetAttachments()) |
213 | sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT); | 211 | { |
212 | if (grp.IsDeleted) | ||
213 | sp.Scene.EventManager.TriggerOnScriptChangedEvent(grp.LocalId, (uint)Changed.TELEPORT); | ||
214 | } | ||
214 | } | 215 | } |
215 | else // Another region possibly in another simulator | 216 | else // Another region possibly in another simulator |
216 | { | 217 | { |
@@ -328,10 +329,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
328 | sp.StandUp(); | 329 | sp.StandUp(); |
329 | 330 | ||
330 | if (!sp.ValidateAttachments()) | 331 | if (!sp.ValidateAttachments()) |
331 | { | 332 | m_log.DebugFormat( |
332 | sp.ControllingClient.SendTeleportFailed("Inconsistent attachment state"); | 333 | "[ENTITY TRANSFER MODULE]: Failed validation of all attachments for teleport of {0} from {1} to {2}. Continuing.", |
333 | return; | 334 | sp.Name, sp.Scene.RegionInfo.RegionName, finalDestination.RegionName); |
334 | } | 335 | |
336 | // if (!sp.ValidateAttachments()) | ||
337 | // { | ||
338 | // sp.ControllingClient.SendTeleportFailed("Inconsistent attachment state"); | ||
339 | // return; | ||
340 | // } | ||
335 | 341 | ||
336 | string reason; | 342 | string reason; |
337 | string version; | 343 | string version; |
@@ -955,7 +961,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
955 | /// This Closes child agents on neighbouring regions | 961 | /// This Closes child agents on neighbouring regions |
956 | /// Calls an asynchronous method to do so.. so it doesn't lag the sim. | 962 | /// Calls an asynchronous method to do so.. so it doesn't lag the sim. |
957 | /// </summary> | 963 | /// </summary> |
958 | protected ScenePresence CrossAgentToNewRegionAsync(ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, GridRegion neighbourRegion, bool isFlying, string version) | 964 | protected ScenePresence CrossAgentToNewRegionAsync( |
965 | ScenePresence agent, Vector3 pos, uint neighbourx, uint neighboury, GridRegion neighbourRegion, | ||
966 | bool isFlying, string version) | ||
959 | { | 967 | { |
960 | ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize)); | 968 | ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize)); |
961 | 969 | ||
@@ -963,8 +971,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
963 | 971 | ||
964 | Scene m_scene = agent.Scene; | 972 | Scene m_scene = agent.Scene; |
965 | 973 | ||
966 | if (neighbourRegion != null && agent.ValidateAttachments()) | 974 | if (neighbourRegion != null) |
967 | { | 975 | { |
976 | if (!agent.ValidateAttachments()) | ||
977 | m_log.DebugFormat( | ||
978 | "[ENTITY TRANSFER MODULE]: Failed validation of all attachments for region crossing of {0} from {1} to {2}. Continuing.", | ||
979 | agent.Name, agent.Scene.RegionInfo.RegionName, neighbourRegion.RegionName); | ||
980 | |||
968 | pos = pos + (agent.Velocity); | 981 | pos = pos + (agent.Velocity); |
969 | 982 | ||
970 | SetInTransit(agent.UUID); | 983 | SetInTransit(agent.UUID); |
@@ -1789,16 +1802,16 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1789 | List<SceneObjectGroup> m_attachments = sp.GetAttachments(); | 1802 | List<SceneObjectGroup> m_attachments = sp.GetAttachments(); |
1790 | 1803 | ||
1791 | // Validate | 1804 | // Validate |
1792 | foreach (SceneObjectGroup gobj in m_attachments) | 1805 | // foreach (SceneObjectGroup gobj in m_attachments) |
1793 | { | 1806 | // { |
1794 | if (gobj == null || gobj.IsDeleted) | 1807 | // if (gobj == null || gobj.IsDeleted) |
1795 | return false; | 1808 | // return false; |
1796 | } | 1809 | // } |
1797 | 1810 | ||
1798 | foreach (SceneObjectGroup gobj in m_attachments) | 1811 | foreach (SceneObjectGroup gobj in m_attachments) |
1799 | { | 1812 | { |
1800 | // If the prim group is null then something must have happened to it! | 1813 | // If the prim group is null then something must have happened to it! |
1801 | if (gobj != null) | 1814 | if (gobj != null && !gobj.IsDeleted) |
1802 | { | 1815 | { |
1803 | // Set the parent localID to 0 so it transfers over properly. | 1816 | // Set the parent localID to 0 so it transfers over properly. |
1804 | gobj.RootPart.SetParentLocalId(0); | 1817 | gobj.RootPart.SetParentLocalId(0); |