aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorJohn Hurliman2009-09-30 15:28:23 -0700
committerJohn Hurliman2009-09-30 15:28:23 -0700
commitacfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009 (patch)
tree305349e1bd0a5849fd7f96483e24d5e07b24b8f4 /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
parent* Adding Scale to EntityBase * Fixing the incorrect initialization of EntityB... (diff)
parentFormatting cleanup. (diff)
downloadopensim-SC_OLD-acfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009.zip
opensim-SC_OLD-acfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009.tar.gz
opensim-SC_OLD-acfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009.tar.bz2
opensim-SC_OLD-acfe2d9f4e5a55d38b16cac7d0d0a25b64b6b009.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs31
1 files changed, 18 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 0cf08b5..57b7e70 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -258,6 +258,11 @@ namespace OpenSim.Region.Framework.Scenes
258 } 258 }
259 } 259 }
260 260
261 private bool IsAttachmentCheckFull()
262 {
263 return (IsAttachment || (m_rootPart.Shape.PCode == 9 && m_rootPart.Shape.State != 0));
264 }
265
261 /// <summary> 266 /// <summary>
262 /// The absolute position of this scene object in the scene 267 /// The absolute position of this scene object in the scene
263 /// </summary> 268 /// </summary>
@@ -270,8 +275,8 @@ namespace OpenSim.Region.Framework.Scenes
270 275
271 if ((m_scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) || m_scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W) 276 if ((m_scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) || m_scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W)
272 || m_scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || m_scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S)) 277 || m_scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || m_scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S))
273 && !IsAttachment) 278 && !IsAttachmentCheckFull())
274 { 279 {
275 m_scene.CrossPrimGroupIntoNewRegion(val, this, true); 280 m_scene.CrossPrimGroupIntoNewRegion(val, this, true);
276 } 281 }
277 282
@@ -462,7 +467,7 @@ namespace OpenSim.Region.Framework.Scenes
462 /// <param name="scene"></param> 467 /// <param name="scene"></param>
463 public void AttachToScene(Scene scene) 468 public void AttachToScene(Scene scene)
464 { 469 {
465 m_scene = scene; 470 m_scene = scene;
466 RegionHandle = m_scene.RegionInfo.RegionHandle; 471 RegionHandle = m_scene.RegionInfo.RegionHandle;
467 472
468 if (m_rootPart.Shape.PCode != 9 || m_rootPart.Shape.State == 0) 473 if (m_rootPart.Shape.PCode != 9 || m_rootPart.Shape.State == 0)
@@ -487,9 +492,9 @@ namespace OpenSim.Region.Framework.Scenes
487 //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); 492 //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);
488 } 493 }
489 494
490 ApplyPhysics(m_scene.m_physicalPrim); 495 ApplyPhysics(m_scene.m_physicalPrim);
491 496
492 ScheduleGroupForFullUpdate(); 497 ScheduleGroupForFullUpdate();
493 } 498 }
494 499
495 public Vector3 GroupScale() 500 public Vector3 GroupScale()
@@ -1045,12 +1050,12 @@ namespace OpenSim.Region.Framework.Scenes
1045 m_rootPart = part; 1050 m_rootPart = part;
1046 if (!IsAttachment) 1051 if (!IsAttachment)
1047 part.ParentID = 0; 1052 part.ParentID = 0;
1048 part.LinkNum = 0; 1053 part.LinkNum = 0;
1049 1054
1050 // No locking required since the SOG should not be in the scene yet - one can't change root parts after 1055 // No locking required since the SOG should not be in the scene yet - one can't change root parts after
1051 // the scene object has been attached to the scene 1056 // the scene object has been attached to the scene
1052 m_parts.Add(m_rootPart.UUID, m_rootPart); 1057 m_parts.Add(m_rootPart.UUID, m_rootPart);
1053 } 1058 }
1054 1059
1055 /// <summary> 1060 /// <summary>
1056 /// Add a new part to this scene object. The part must already be correctly configured. 1061 /// Add a new part to this scene object. The part must already be correctly configured.
@@ -1168,7 +1173,7 @@ namespace OpenSim.Region.Framework.Scenes
1168 1173
1169 /// <summary> 1174 /// <summary>
1170 /// Delete this group from its scene and tell all the scene presences about that deletion. 1175 /// Delete this group from its scene and tell all the scene presences about that deletion.
1171 /// </summary> 1176 /// </summary>
1172 /// <param name="silent">Broadcast deletions to all clients.</param> 1177 /// <param name="silent">Broadcast deletions to all clients.</param>
1173 public void DeleteGroup(bool silent) 1178 public void DeleteGroup(bool silent)
1174 { 1179 {
@@ -1275,11 +1280,11 @@ namespace OpenSim.Region.Framework.Scenes
1275 if (part.LocalId != m_rootPart.LocalId) 1280 if (part.LocalId != m_rootPart.LocalId)
1276 { 1281 {
1277 part.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), part.VolumeDetectActive, m_physicalPrim); 1282 part.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), part.VolumeDetectActive, m_physicalPrim);
1278 } 1283 }
1279 } 1284 }
1280 1285
1281 // Hack to get the physics scene geometries in the right spot 1286 // Hack to get the physics scene geometries in the right spot
1282 ResetChildPrimPhysicsPositions(); 1287 ResetChildPrimPhysicsPositions();
1283 } 1288 }
1284 else 1289 else
1285 { 1290 {
@@ -1502,7 +1507,7 @@ namespace OpenSim.Region.Framework.Scenes
1502 List<SceneObjectPart> partList; 1507 List<SceneObjectPart> partList;
1503 1508
1504 lock (m_parts) 1509 lock (m_parts)
1505 { 1510 {
1506 partList = new List<SceneObjectPart>(m_parts.Values); 1511 partList = new List<SceneObjectPart>(m_parts.Values);
1507 } 1512 }
1508 1513
@@ -1752,7 +1757,7 @@ namespace OpenSim.Region.Framework.Scenes
1752 rootpart.PhysActor.PIDHoverActive = false; 1757 rootpart.PhysActor.PIDHoverActive = false;
1753 } 1758 }
1754 } 1759 }
1755 } 1760 }
1756 } 1761 }
1757 1762
1758 /// <summary> 1763 /// <summary>