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/Framework/Scenes/SceneObjectGroup.cs | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
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
From ee205e7e812e170f670e690a4e0fa9caa652f226 Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Thu, 1 Oct 2009 01:00:09 +0900
Subject: Formatting cleanup.
---
.../Region/Framework/Scenes/SceneObjectGroup.cs | 24 +++++++++++-----------
1 file changed, 12 insertions(+), 12 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index ad5d56f..5c0024f 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -263,7 +263,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))
&& !IsAttachmentCheckFull())
- {
+ {
m_scene.CrossPrimGroupIntoNewRegion(val, this, true);
}
@@ -454,7 +454,7 @@ namespace OpenSim.Region.Framework.Scenes
///
public void AttachToScene(Scene scene)
{
- m_scene = scene;
+ m_scene = scene;
RegionHandle = m_scene.RegionInfo.RegionHandle;
if (m_rootPart.Shape.PCode != 9 || m_rootPart.Shape.State == 0)
@@ -479,9 +479,9 @@ namespace OpenSim.Region.Framework.Scenes
//m_log.DebugFormat("[SCENE]: Given local id {0} to part {1}, linknum {2}, parent {3} {4}", part.LocalId, part.UUID, part.LinkNum, part.ParentID, part.ParentUUID);
}
- ApplyPhysics(m_scene.m_physicalPrim);
+ ApplyPhysics(m_scene.m_physicalPrim);
- ScheduleGroupForFullUpdate();
+ ScheduleGroupForFullUpdate();
}
public Vector3 GroupScale()
@@ -1037,12 +1037,12 @@ namespace OpenSim.Region.Framework.Scenes
m_rootPart = part;
if (!IsAttachment)
part.ParentID = 0;
- part.LinkNum = 0;
+ part.LinkNum = 0;
// No locking required since the SOG should not be in the scene yet - one can't change root parts after
// the scene object has been attached to the scene
m_parts.Add(m_rootPart.UUID, m_rootPart);
- }
+ }
///
/// Add a new part to this scene object. The part must already be correctly configured.
@@ -1160,7 +1160,7 @@ namespace OpenSim.Region.Framework.Scenes
///
/// Delete this group from its scene and tell all the scene presences about that deletion.
- ///
+ ///
/// Broadcast deletions to all clients.
public void DeleteGroup(bool silent)
{
@@ -1267,11 +1267,11 @@ namespace OpenSim.Region.Framework.Scenes
if (part.LocalId != m_rootPart.LocalId)
{
part.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), part.VolumeDetectActive, m_physicalPrim);
- }
- }
+ }
+ }
// Hack to get the physics scene geometries in the right spot
- ResetChildPrimPhysicsPositions();
+ ResetChildPrimPhysicsPositions();
}
else
{
@@ -1494,7 +1494,7 @@ namespace OpenSim.Region.Framework.Scenes
List partList;
lock (m_parts)
- {
+ {
partList = new List(m_parts.Values);
}
@@ -1744,7 +1744,7 @@ namespace OpenSim.Region.Framework.Scenes
rootpart.PhysActor.PIDHoverActive = false;
}
}
- }
+ }
}
///
--
cgit v1.1