* 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.
remotes/origin/0.6.7-post-fixes
Teravus Ovares (Dan Olivares) 2009-09-25 16:06:04 -04:00
parent 0a0b532270
commit 2bb513329a
2 changed files with 9 additions and 4 deletions

View File

@ -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);

View File

@ -245,6 +245,11 @@ namespace OpenSim.Region.Framework.Scenes
}
}
private bool IsAttachmentCheckFull()
{
return (IsAttachment || (m_rootPart.Shape.PCode == 9 && m_rootPart.Shape.State != 0));
}
/// <summary>
/// The absolute position of this scene object in the scene
/// </summary>
@ -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);
}