aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorMelanie2011-12-17 12:31:25 +0100
committerMelanie2011-12-17 12:31:25 +0100
commit8a9a8ed5c903f3f685dfff2fd81a2c9594a12584 (patch)
treed7614cf4139be6b37eb901c9513d6f5f348f230f /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
parentMerge branch 'master' into careminster (diff)
downloadopensim-SC_OLD-8a9a8ed5c903f3f685dfff2fd81a2c9594a12584.zip
opensim-SC_OLD-8a9a8ed5c903f3f685dfff2fd81a2c9594a12584.tar.gz
opensim-SC_OLD-8a9a8ed5c903f3f685dfff2fd81a2c9594a12584.tar.bz2
opensim-SC_OLD-8a9a8ed5c903f3f685dfff2fd81a2c9594a12584.tar.xz
Fix hit testing link sets properly. Fix raycasting for LSL.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 67eafd5..09cbbfe 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -789,6 +789,10 @@ namespace OpenSim.Region.Framework.Scenes
789 EntityIntersection result = new EntityIntersection(); 789 EntityIntersection result = new EntityIntersection();
790 790
791 SceneObjectPart[] parts = m_parts.GetArray(); 791 SceneObjectPart[] parts = m_parts.GetArray();
792
793 // Find closest hit here
794 float idist = float.MaxValue;
795
792 for (int i = 0; i < parts.Length; i++) 796 for (int i = 0; i < parts.Length; i++)
793 { 797 {
794 SceneObjectPart part = parts[i]; 798 SceneObjectPart part = parts[i];
@@ -803,11 +807,6 @@ namespace OpenSim.Region.Framework.Scenes
803 807
804 EntityIntersection inter = part.TestIntersectionOBB(hRay, parentrotation, frontFacesOnly, faceCenters); 808 EntityIntersection inter = part.TestIntersectionOBB(hRay, parentrotation, frontFacesOnly, faceCenters);
805 809
806 // This may need to be updated to the maximum draw distance possible..
807 // We might (and probably will) be checking for prim creation from other sims
808 // when the camera crosses the border.
809 float idist = Constants.RegionSize;
810
811 if (inter.HitTF) 810 if (inter.HitTF)
812 { 811 {
813 // We need to find the closest prim to return to the testcaller along the ray 812 // We need to find the closest prim to return to the testcaller along the ray
@@ -818,8 +817,9 @@ namespace OpenSim.Region.Framework.Scenes
818 result.obj = part; 817 result.obj = part;
819 result.normal = inter.normal; 818 result.normal = inter.normal;
820 result.distance = inter.distance; 819 result.distance = inter.distance;
820
821 idist = inter.distance;
821 } 822 }
822
823 } 823 }
824 } 824 }
825 return result; 825 return result;