From 9d9fcac0386ba6adc7a1f6c08f82bd5c0b6cd1d2 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Fri, 14 Aug 2009 17:16:41 +0900 Subject: Misc cleanup. --- .../Region/Framework/Scenes/SceneObjectGroup.cs | 51 ++++++---------------- 1 file changed, 13 insertions(+), 38 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 c86e4a1..bc3d5c0 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -555,7 +555,7 @@ namespace OpenSim.Region.Framework.Scenes // If we get a result, we're going to find the closest result to the origin of the ray // and send back the intersection information back to the innerscene. - EntityIntersection returnresult = new EntityIntersection(); + EntityIntersection result = new EntityIntersection(); lock (m_parts) { @@ -576,26 +576,23 @@ namespace OpenSim.Region.Framework.Scenes // when the camera crosses the border. float idist = Constants.RegionSize; - if (inter.HitTF) { // We need to find the closest prim to return to the testcaller along the ray if (inter.distance < idist) { - returnresult.HitTF = true; - returnresult.ipoint = inter.ipoint; - returnresult.obj = part; - returnresult.normal = inter.normal; - returnresult.distance = inter.distance; + result.HitTF = true; + result.ipoint = inter.ipoint; + result.obj = part; + result.normal = inter.normal; + result.distance = inter.distance; } } } } - return returnresult; + return result; } - - /// /// Gets a vector representing the size of the bounding box containing all the prims in the group /// Treats all prims as rectangular, so no shape (cut etc) is taken into account @@ -652,7 +649,6 @@ namespace OpenSim.Region.Framework.Scenes frontBottomRight.Y = orig.Y + (part.Scale.Y / 2); frontBottomRight.Z = orig.Z - (part.Scale.Z / 2); - backTopLeft.X = orig.X + (part.Scale.X / 2); backTopLeft.Y = orig.Y - (part.Scale.Y / 2); backTopLeft.Z = orig.Z + (part.Scale.Z / 2); @@ -839,7 +835,6 @@ namespace OpenSim.Region.Framework.Scenes if (backBottomLeft.Z < minZ) minZ = backBottomLeft.Z; } - } Vector3 boundingBox = new Vector3(maxX - minX, maxY - minY, maxZ - minZ); @@ -860,6 +855,7 @@ namespace OpenSim.Region.Framework.Scenes // m_log.InfoFormat("BoundingBox is {0} , {1} , {2} ", boundingBox.X, boundingBox.Y, boundingBox.Z); return boundingBox; } + #endregion public void SaveScriptedState(XmlTextWriter writer) @@ -1029,8 +1025,8 @@ namespace OpenSim.Region.Framework.Scenes //m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_scene.m_physicalPrim); //AttachToBackup(); //m_rootPart.ScheduleFullUpdate(); - } + /// /// /// @@ -1130,6 +1126,7 @@ namespace OpenSim.Region.Framework.Scenes } } } + // helper provided for parts. public int GetSceneMaxUndo() { @@ -1183,7 +1180,6 @@ namespace OpenSim.Region.Framework.Scenes { SceneObjectPart part = GetChildPart(localId); OnGrabPart(part, offsetPos, remoteClient); - } } @@ -1267,28 +1263,10 @@ namespace OpenSim.Region.Framework.Scenes } } - if ((aggregateScriptEvents & scriptEvents.at_target) != 0) - { - m_scriptListens_atTarget = true; - } - else - { - m_scriptListens_atTarget = false; - } - - if ((aggregateScriptEvents & scriptEvents.not_at_target) != 0) - { - m_scriptListens_notAtTarget = true; - } - else - { - m_scriptListens_notAtTarget = false; - } + m_scriptListens_atTarget = ((aggregateScriptEvents & scriptEvents.at_target) != 0); + m_scriptListens_notAtTarget = ((aggregateScriptEvents & scriptEvents.not_at_target) != 0); - if (m_scriptListens_atTarget || m_scriptListens_notAtTarget) - { - } - else + if (!m_scriptListens_atTarget && !m_scriptListens_notAtTarget) { lock (m_targets) m_targets.Clear(); @@ -1787,9 +1765,6 @@ namespace OpenSim.Region.Framework.Scenes } } - - - /// /// Set the owner of the root part. /// -- cgit v1.1