From 2bb513329ac98914ff13a2817aa83b60d85603d9 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Fri, 25 Sep 2009 16:06:04 -0400 Subject: * Does a full battery of tests to ensure that the object isn't an attachment before border crossing * Fixes 'Inconsistent Attachment State' when teleporting into another region besides the SW most region slot on a MegaRegion. * Fixes a host of other unintended attachment border cross edge cases that lead to Inconsistent attachment state. --- OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs | 6 +++--- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs index 1436912..181c5ae 100644 --- a/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/RegionCombinerModule.cs @@ -79,12 +79,12 @@ namespace OpenSim.Region.CoreModules.World.Land { if (!enabledYN) return; - +/* // For testing on a single instance if (scene.RegionInfo.RegionLocX == 1004 && scene.RegionInfo.RegionLocY == 1000) return; - // - + // +*/ lock (m_startingScenes) m_startingScenes.Add(scene.RegionInfo.originRegionID, scene); diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 3c17bbe..ad5d56f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -245,6 +245,11 @@ namespace OpenSim.Region.Framework.Scenes } } + private bool IsAttachmentCheckFull() + { + return (IsAttachment || (m_rootPart.Shape.PCode == 9 && m_rootPart.Shape.State != 0)); + } + /// /// The absolute position of this scene object in the scene /// @@ -257,7 +262,7 @@ namespace OpenSim.Region.Framework.Scenes if ((m_scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) || m_scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W) || m_scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || m_scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S)) - && !IsAttachment) + && !IsAttachmentCheckFull()) { m_scene.CrossPrimGroupIntoNewRegion(val, this, true); } -- cgit v1.1