diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 51 |
1 files changed, 13 insertions, 38 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 00c59ca..708c455 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -555,7 +555,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
555 | // If we get a result, we're going to find the closest result to the origin of the ray | 555 | // If we get a result, we're going to find the closest result to the origin of the ray |
556 | // and send back the intersection information back to the innerscene. | 556 | // and send back the intersection information back to the innerscene. |
557 | 557 | ||
558 | EntityIntersection returnresult = new EntityIntersection(); | 558 | EntityIntersection result = new EntityIntersection(); |
559 | 559 | ||
560 | lock (m_parts) | 560 | lock (m_parts) |
561 | { | 561 | { |
@@ -576,26 +576,23 @@ namespace OpenSim.Region.Framework.Scenes | |||
576 | // when the camera crosses the border. | 576 | // when the camera crosses the border. |
577 | float idist = Constants.RegionSize; | 577 | float idist = Constants.RegionSize; |
578 | 578 | ||
579 | |||
580 | if (inter.HitTF) | 579 | if (inter.HitTF) |
581 | { | 580 | { |
582 | // We need to find the closest prim to return to the testcaller along the ray | 581 | // We need to find the closest prim to return to the testcaller along the ray |
583 | if (inter.distance < idist) | 582 | if (inter.distance < idist) |
584 | { | 583 | { |
585 | returnresult.HitTF = true; | 584 | result.HitTF = true; |
586 | returnresult.ipoint = inter.ipoint; | 585 | result.ipoint = inter.ipoint; |
587 | returnresult.obj = part; | 586 | result.obj = part; |
588 | returnresult.normal = inter.normal; | 587 | result.normal = inter.normal; |
589 | returnresult.distance = inter.distance; | 588 | result.distance = inter.distance; |
590 | } | 589 | } |
591 | } | 590 | } |
592 | } | 591 | } |
593 | } | 592 | } |
594 | return returnresult; | 593 | return result; |
595 | } | 594 | } |
596 | 595 | ||
597 | |||
598 | |||
599 | /// <summary> | 596 | /// <summary> |
600 | /// Gets a vector representing the size of the bounding box containing all the prims in the group | 597 | /// Gets a vector representing the size of the bounding box containing all the prims in the group |
601 | /// Treats all prims as rectangular, so no shape (cut etc) is taken into account | 598 | /// Treats all prims as rectangular, so no shape (cut etc) is taken into account |
@@ -652,7 +649,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
652 | frontBottomRight.Y = orig.Y + (part.Scale.Y / 2); | 649 | frontBottomRight.Y = orig.Y + (part.Scale.Y / 2); |
653 | frontBottomRight.Z = orig.Z - (part.Scale.Z / 2); | 650 | frontBottomRight.Z = orig.Z - (part.Scale.Z / 2); |
654 | 651 | ||
655 | |||
656 | backTopLeft.X = orig.X + (part.Scale.X / 2); | 652 | backTopLeft.X = orig.X + (part.Scale.X / 2); |
657 | backTopLeft.Y = orig.Y - (part.Scale.Y / 2); | 653 | backTopLeft.Y = orig.Y - (part.Scale.Y / 2); |
658 | backTopLeft.Z = orig.Z + (part.Scale.Z / 2); | 654 | backTopLeft.Z = orig.Z + (part.Scale.Z / 2); |
@@ -839,7 +835,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
839 | if (backBottomLeft.Z < minZ) | 835 | if (backBottomLeft.Z < minZ) |
840 | minZ = backBottomLeft.Z; | 836 | minZ = backBottomLeft.Z; |
841 | } | 837 | } |
842 | |||
843 | } | 838 | } |
844 | 839 | ||
845 | Vector3 boundingBox = new Vector3(maxX - minX, maxY - minY, maxZ - minZ); | 840 | Vector3 boundingBox = new Vector3(maxX - minX, maxY - minY, maxZ - minZ); |
@@ -860,6 +855,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
860 | // m_log.InfoFormat("BoundingBox is {0} , {1} , {2} ", boundingBox.X, boundingBox.Y, boundingBox.Z); | 855 | // m_log.InfoFormat("BoundingBox is {0} , {1} , {2} ", boundingBox.X, boundingBox.Y, boundingBox.Z); |
861 | return boundingBox; | 856 | return boundingBox; |
862 | } | 857 | } |
858 | |||
863 | #endregion | 859 | #endregion |
864 | 860 | ||
865 | public void SaveScriptedState(XmlTextWriter writer) | 861 | public void SaveScriptedState(XmlTextWriter writer) |
@@ -1029,8 +1025,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1029 | //m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_scene.m_physicalPrim); | 1025 | //m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_scene.m_physicalPrim); |
1030 | //AttachToBackup(); | 1026 | //AttachToBackup(); |
1031 | //m_rootPart.ScheduleFullUpdate(); | 1027 | //m_rootPart.ScheduleFullUpdate(); |
1032 | |||
1033 | } | 1028 | } |
1029 | |||
1034 | /// <summary> | 1030 | /// <summary> |
1035 | /// | 1031 | /// |
1036 | /// </summary> | 1032 | /// </summary> |
@@ -1130,6 +1126,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1130 | } | 1126 | } |
1131 | } | 1127 | } |
1132 | } | 1128 | } |
1129 | |||
1133 | // helper provided for parts. | 1130 | // helper provided for parts. |
1134 | public int GetSceneMaxUndo() | 1131 | public int GetSceneMaxUndo() |
1135 | { | 1132 | { |
@@ -1183,7 +1180,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1183 | { | 1180 | { |
1184 | SceneObjectPart part = GetChildPart(localId); | 1181 | SceneObjectPart part = GetChildPart(localId); |
1185 | OnGrabPart(part, offsetPos, remoteClient); | 1182 | OnGrabPart(part, offsetPos, remoteClient); |
1186 | |||
1187 | } | 1183 | } |
1188 | } | 1184 | } |
1189 | 1185 | ||
@@ -1267,28 +1263,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1267 | } | 1263 | } |
1268 | } | 1264 | } |
1269 | 1265 | ||
1270 | if ((aggregateScriptEvents & scriptEvents.at_target) != 0) | 1266 | m_scriptListens_atTarget = ((aggregateScriptEvents & scriptEvents.at_target) != 0); |
1271 | { | 1267 | m_scriptListens_notAtTarget = ((aggregateScriptEvents & scriptEvents.not_at_target) != 0); |
1272 | m_scriptListens_atTarget = true; | ||
1273 | } | ||
1274 | else | ||
1275 | { | ||
1276 | m_scriptListens_atTarget = false; | ||
1277 | } | ||
1278 | |||
1279 | if ((aggregateScriptEvents & scriptEvents.not_at_target) != 0) | ||
1280 | { | ||
1281 | m_scriptListens_notAtTarget = true; | ||
1282 | } | ||
1283 | else | ||
1284 | { | ||
1285 | m_scriptListens_notAtTarget = false; | ||
1286 | } | ||
1287 | 1268 | ||
1288 | if (m_scriptListens_atTarget || m_scriptListens_notAtTarget) | 1269 | if (!m_scriptListens_atTarget && !m_scriptListens_notAtTarget) |
1289 | { | ||
1290 | } | ||
1291 | else | ||
1292 | { | 1270 | { |
1293 | lock (m_targets) | 1271 | lock (m_targets) |
1294 | m_targets.Clear(); | 1272 | m_targets.Clear(); |
@@ -1787,9 +1765,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1787 | } | 1765 | } |
1788 | } | 1766 | } |
1789 | 1767 | ||
1790 | |||
1791 | |||
1792 | |||
1793 | /// <summary> | 1768 | /// <summary> |
1794 | /// Set the owner of the root part. | 1769 | /// Set the owner of the root part. |
1795 | /// </summary> | 1770 | /// </summary> |