diff options
author | Diva Canto | 2009-08-16 08:59:58 -0700 |
---|---|---|
committer | Diva Canto | 2009-08-16 08:59:58 -0700 |
commit | 6808b9109e33a111e3655ae214cd7b80ef3346f4 (patch) | |
tree | 02cddcbd4d6676dfc4840863e498943986b19c47 /OpenSim/Region/Framework/Scenes/SceneGraph.cs | |
parent | Merge branch 'master' into inventory-connector (diff) | |
parent | * Implements ISecurityCredential member on SPAvatar, SPAvatarAttachment (diff) | |
download | opensim-SC-6808b9109e33a111e3655ae214cd7b80ef3346f4.zip opensim-SC-6808b9109e33a111e3655ae214cd7b80ef3346f4.tar.gz opensim-SC-6808b9109e33a111e3655ae214cd7b80ef3346f4.tar.bz2 opensim-SC-6808b9109e33a111e3655ae214cd7b80ef3346f4.tar.xz |
Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim into inventory-connector
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 7a45e3b..3bd079a 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 | } |