diff options
author | Jeff Ames | 2009-08-14 17:16:41 +0900 |
---|---|---|
committer | Jeff Ames | 2009-08-16 17:14:21 +0900 |
commit | 9d9fcac0386ba6adc7a1f6c08f82bd5c0b6cd1d2 (patch) | |
tree | 49c1ee6dc94e0812f1aeb9212af99167a5abcf06 /OpenSim/Region/Framework/Scenes/SceneGraph.cs | |
parent | Thanks dmiles for a patch that adds PacketType.RequestMultipleObjects Packet ... (diff) | |
download | opensim-SC_OLD-9d9fcac0386ba6adc7a1f6c08f82bd5c0b6cd1d2.zip opensim-SC_OLD-9d9fcac0386ba6adc7a1f6c08f82bd5c0b6cd1d2.tar.gz opensim-SC_OLD-9d9fcac0386ba6adc7a1f6c08f82bd5c0b6cd1d2.tar.bz2 opensim-SC_OLD-9d9fcac0386ba6adc7a1f6c08f82bd5c0b6cd1d2.tar.xz |
Misc cleanup.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 0e0999a..7771831 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -928,25 +928,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
928 | { | 928 | { |
929 | // Primitive Ray Tracing | 929 | // Primitive Ray Tracing |
930 | float closestDistance = 280f; | 930 | float closestDistance = 280f; |
931 | EntityIntersection returnResult = new EntityIntersection(); | 931 | EntityIntersection result = new EntityIntersection(); |
932 | List<EntityBase> EntityList = GetEntities(); | 932 | List<EntityBase> EntityList = GetEntities(); |
933 | foreach (EntityBase ent in EntityList) | 933 | foreach (EntityBase ent in EntityList) |
934 | { | 934 | { |
935 | if (ent is SceneObjectGroup) | 935 | if (ent is SceneObjectGroup) |
936 | { | 936 | { |
937 | SceneObjectGroup reportingG = (SceneObjectGroup)ent; | 937 | SceneObjectGroup reportingG = (SceneObjectGroup)ent; |
938 | EntityIntersection result = reportingG.TestIntersection(hray, frontFacesOnly, faceCenters); | 938 | EntityIntersection inter = reportingG.TestIntersection(hray, frontFacesOnly, faceCenters); |
939 | if (result.HitTF) | 939 | if (inter.HitTF && inter.distance < closestDistance) |
940 | { | 940 | { |
941 | if (result.distance < closestDistance) | 941 | closestDistance = inter.distance; |
942 | { | 942 | result = inter; |
943 | closestDistance = result.distance; | ||
944 | returnResult = result; | ||
945 | } | ||
946 | } | 943 | } |
947 | } | 944 | } |
948 | } | 945 | } |
949 | return returnResult; | 946 | return result; |
950 | } | 947 | } |
951 | 948 | ||
952 | /// <summary> | 949 | /// <summary> |
@@ -979,7 +976,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
979 | { | 976 | { |
980 | foreach (SceneObjectPart p in ((SceneObjectGroup) ent).GetParts()) | 977 | foreach (SceneObjectPart p in ((SceneObjectGroup) ent).GetParts()) |
981 | { | 978 | { |
982 | if (p.Name==name) | 979 | if (p.Name == name) |
983 | { | 980 | { |
984 | return p; | 981 | return p; |
985 | } | 982 | } |