aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs33
1 files changed, 19 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 3c17bbe..25489d8 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -133,7 +133,7 @@ namespace OpenSim.Region.Framework.Scenes
133 /// Is this scene object acting as an attachment? 133 /// Is this scene object acting as an attachment?
134 /// 134 ///
135 /// We return false if the group has already been deleted. 135 /// We return false if the group has already been deleted.
136 /// 136 ///
137 /// TODO: At the moment set must be done on the part itself. There may be a case for doing it here since I 137 /// TODO: At the moment set must be done on the part itself. There may be a case for doing it here since I
138 /// presume either all or no parts in a linkset can be part of an attachment (in which 138 /// presume either all or no parts in a linkset can be part of an attachment (in which
139 /// case the value would get proprogated down into all the descendent parts). 139 /// case the value would get proprogated down into all the descendent parts).
@@ -245,6 +245,11 @@ namespace OpenSim.Region.Framework.Scenes
245 } 245 }
246 } 246 }
247 247
248 private bool IsAttachmentCheckFull()
249 {
250 return (IsAttachment || (m_rootPart.Shape.PCode == 9 && m_rootPart.Shape.State != 0));
251 }
252
248 /// <summary> 253 /// <summary>
249 /// The absolute position of this scene object in the scene 254 /// The absolute position of this scene object in the scene
250 /// </summary> 255 /// </summary>
@@ -257,8 +262,8 @@ namespace OpenSim.Region.Framework.Scenes
257 262
258 if ((m_scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) || m_scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W) 263 if ((m_scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) || m_scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W)
259 || m_scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || m_scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S)) 264 || m_scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || m_scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S))
260 && !IsAttachment) 265 && !IsAttachmentCheckFull())
261 { 266 {
262 m_scene.CrossPrimGroupIntoNewRegion(val, this, true); 267 m_scene.CrossPrimGroupIntoNewRegion(val, this, true);
263 } 268 }
264 269
@@ -449,7 +454,7 @@ namespace OpenSim.Region.Framework.Scenes
449 /// <param name="scene"></param> 454 /// <param name="scene"></param>
450 public void AttachToScene(Scene scene) 455 public void AttachToScene(Scene scene)
451 { 456 {
452 m_scene = scene; 457 m_scene = scene;
453 RegionHandle = m_scene.RegionInfo.RegionHandle; 458 RegionHandle = m_scene.RegionInfo.RegionHandle;
454 459
455 if (m_rootPart.Shape.PCode != 9 || m_rootPart.Shape.State == 0) 460 if (m_rootPart.Shape.PCode != 9 || m_rootPart.Shape.State == 0)
@@ -474,9 +479,9 @@ namespace OpenSim.Region.Framework.Scenes
474 //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); 479 //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);
475 } 480 }
476 481
477 ApplyPhysics(m_scene.m_physicalPrim); 482 ApplyPhysics(m_scene.m_physicalPrim);
478 483
479 ScheduleGroupForFullUpdate(); 484 ScheduleGroupForFullUpdate();
480 } 485 }
481 486
482 public Vector3 GroupScale() 487 public Vector3 GroupScale()
@@ -1032,12 +1037,12 @@ namespace OpenSim.Region.Framework.Scenes
1032 m_rootPart = part; 1037 m_rootPart = part;
1033 if (!IsAttachment) 1038 if (!IsAttachment)
1034 part.ParentID = 0; 1039 part.ParentID = 0;
1035 part.LinkNum = 0; 1040 part.LinkNum = 0;
1036 1041
1037 // No locking required since the SOG should not be in the scene yet - one can't change root parts after 1042 // No locking required since the SOG should not be in the scene yet - one can't change root parts after
1038 // the scene object has been attached to the scene 1043 // the scene object has been attached to the scene
1039 m_parts.Add(m_rootPart.UUID, m_rootPart); 1044 m_parts.Add(m_rootPart.UUID, m_rootPart);
1040 } 1045 }
1041 1046
1042 /// <summary> 1047 /// <summary>
1043 /// Add a new part to this scene object. The part must already be correctly configured. 1048 /// Add a new part to this scene object. The part must already be correctly configured.
@@ -1155,7 +1160,7 @@ namespace OpenSim.Region.Framework.Scenes
1155 1160
1156 /// <summary> 1161 /// <summary>
1157 /// Delete this group from its scene and tell all the scene presences about that deletion. 1162 /// Delete this group from its scene and tell all the scene presences about that deletion.
1158 /// </summary> 1163 /// </summary>
1159 /// <param name="silent">Broadcast deletions to all clients.</param> 1164 /// <param name="silent">Broadcast deletions to all clients.</param>
1160 public void DeleteGroup(bool silent) 1165 public void DeleteGroup(bool silent)
1161 { 1166 {
@@ -1262,11 +1267,11 @@ namespace OpenSim.Region.Framework.Scenes
1262 if (part.LocalId != m_rootPart.LocalId) 1267 if (part.LocalId != m_rootPart.LocalId)
1263 { 1268 {
1264 part.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), part.VolumeDetectActive, m_physicalPrim); 1269 part.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), part.VolumeDetectActive, m_physicalPrim);
1265 } 1270 }
1266 } 1271 }
1267 1272
1268 // Hack to get the physics scene geometries in the right spot 1273 // Hack to get the physics scene geometries in the right spot
1269 ResetChildPrimPhysicsPositions(); 1274 ResetChildPrimPhysicsPositions();
1270 } 1275 }
1271 else 1276 else
1272 { 1277 {
@@ -1489,7 +1494,7 @@ namespace OpenSim.Region.Framework.Scenes
1489 List<SceneObjectPart> partList; 1494 List<SceneObjectPart> partList;
1490 1495
1491 lock (m_parts) 1496 lock (m_parts)
1492 { 1497 {
1493 partList = new List<SceneObjectPart>(m_parts.Values); 1498 partList = new List<SceneObjectPart>(m_parts.Values);
1494 } 1499 }
1495 1500
@@ -1739,7 +1744,7 @@ namespace OpenSim.Region.Framework.Scenes
1739 rootpart.PhysActor.PIDHoverActive = false; 1744 rootpart.PhysActor.PIDHoverActive = false;
1740 } 1745 }
1741 } 1746 }
1742 } 1747 }
1743 } 1748 }
1744 1749
1745 /// <summary> 1750 /// <summary>