aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorMelanie2012-05-29 18:18:47 +0100
committerMelanie2012-05-29 18:18:47 +0100
commitb660c4991bf5982bc22690357e2dd6a4b015d9e9 (patch)
tree4f5c53680dbebc7370372457fc435d06d1fe8595 /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
parentrefactor: factor out entity transfer state machine into a separate class to m... (diff)
downloadopensim-SC-b660c4991bf5982bc22690357e2dd6a4b015d9e9.zip
opensim-SC-b660c4991bf5982bc22690357e2dd6a4b015d9e9.tar.gz
opensim-SC-b660c4991bf5982bc22690357e2dd6a4b015d9e9.tar.bz2
opensim-SC-b660c4991bf5982bc22690357e2dd6a4b015d9e9.tar.xz
Fix collision filtering. The filter should be checked on the receiving part!
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs18
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index dc76d22..17c7661 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2023,21 +2023,21 @@ namespace OpenSim.Region.Framework.Scenes
2023 { 2023 {
2024 } 2024 }
2025 2025
2026 private bool CollisionFilteredOut(SceneObjectPart dest, UUID objectID, string objectName) 2026 public bool CollisionFilteredOut(UUID objectID, string objectName)
2027 { 2027 {
2028 if(dest.CollisionFilter.Count == 0) 2028 if(CollisionFilter.Count == 0)
2029 return false; 2029 return false;
2030 2030
2031 if (dest.CollisionFilter.ContainsValue(objectID.ToString()) || 2031 if (CollisionFilter.ContainsValue(objectID.ToString()) ||
2032 dest.CollisionFilter.ContainsValue(objectID.ToString() + objectName) || 2032 CollisionFilter.ContainsValue(objectID.ToString() + objectName) ||
2033 dest.CollisionFilter.ContainsValue(UUID.Zero.ToString() + objectName)) 2033 CollisionFilter.ContainsValue(UUID.Zero.ToString() + objectName))
2034 { 2034 {
2035 if (dest.CollisionFilter.ContainsKey(1)) 2035 if (CollisionFilter.ContainsKey(1))
2036 return false; 2036 return false;
2037 return true; 2037 return true;
2038 } 2038 }
2039 2039
2040 if (dest.CollisionFilter.ContainsKey(1)) 2040 if (CollisionFilter.ContainsKey(1))
2041 return true; 2041 return true;
2042 2042
2043 return false; 2043 return false;
@@ -2100,7 +2100,7 @@ namespace OpenSim.Region.Framework.Scenes
2100 SceneObjectPart obj = ParentGroup.Scene.GetSceneObjectPart(localId); 2100 SceneObjectPart obj = ParentGroup.Scene.GetSceneObjectPart(localId);
2101 if (obj != null) 2101 if (obj != null)
2102 { 2102 {
2103 if (!dest.CollisionFilteredOut(this, obj.UUID, obj.Name)) 2103 if (!dest.CollisionFilteredOut(obj.UUID, obj.Name))
2104 colliding.Add(CreateDetObject(obj)); 2104 colliding.Add(CreateDetObject(obj));
2105 } 2105 }
2106 else 2106 else
@@ -2108,7 +2108,7 @@ namespace OpenSim.Region.Framework.Scenes
2108 ScenePresence av = ParentGroup.Scene.GetScenePresence(localId); 2108 ScenePresence av = ParentGroup.Scene.GetScenePresence(localId);
2109 if (av != null && (!av.IsChildAgent)) 2109 if (av != null && (!av.IsChildAgent))
2110 { 2110 {
2111 if (!dest.CollisionFilteredOut(this, av.UUID, av.Name)) 2111 if (!dest.CollisionFilteredOut(av.UUID, av.Name))
2112 colliding.Add(CreateDetObject(av)); 2112 colliding.Add(CreateDetObject(av));
2113 } 2113 }
2114 } 2114 }