Fix collision filtering
parent
dbbfe0cdd7
commit
10e9ad0086
|
@ -2495,21 +2495,21 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool CollisionFilteredOut(SceneObjectPart dest, UUID objectID, string objectName)
|
public bool CollisionFilteredOut(UUID objectID, string objectName)
|
||||||
{
|
{
|
||||||
if(dest.CollisionFilter.Count == 0)
|
if(CollisionFilter.Count == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (dest.CollisionFilter.ContainsValue(objectID.ToString()) ||
|
if (CollisionFilter.ContainsValue(objectID.ToString()) ||
|
||||||
dest.CollisionFilter.ContainsValue(objectID.ToString() + objectName) ||
|
CollisionFilter.ContainsValue(objectID.ToString() + objectName) ||
|
||||||
dest.CollisionFilter.ContainsValue(UUID.Zero.ToString() + objectName))
|
CollisionFilter.ContainsValue(UUID.Zero.ToString() + objectName))
|
||||||
{
|
{
|
||||||
if (dest.CollisionFilter.ContainsKey(1))
|
if (CollisionFilter.ContainsKey(1))
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dest.CollisionFilter.ContainsKey(1))
|
if (CollisionFilter.ContainsKey(1))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -2572,7 +2572,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SceneObjectPart obj = ParentGroup.Scene.GetSceneObjectPart(localId);
|
SceneObjectPart obj = ParentGroup.Scene.GetSceneObjectPart(localId);
|
||||||
if (obj != null)
|
if (obj != null)
|
||||||
{
|
{
|
||||||
if (!dest.CollisionFilteredOut(this, obj.UUID, obj.Name))
|
if (!dest.CollisionFilteredOut(obj.UUID, obj.Name))
|
||||||
colliding.Add(CreateDetObject(obj));
|
colliding.Add(CreateDetObject(obj));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2580,7 +2580,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
ScenePresence av = ParentGroup.Scene.GetScenePresence(localId);
|
ScenePresence av = ParentGroup.Scene.GetScenePresence(localId);
|
||||||
if (av != null && (!av.IsChildAgent))
|
if (av != null && (!av.IsChildAgent))
|
||||||
{
|
{
|
||||||
if (!dest.CollisionFilteredOut(this, av.UUID, av.Name))
|
if (!dest.CollisionFilteredOut(av.UUID, av.Name))
|
||||||
colliding.Add(CreateDetObject(av));
|
colliding.Add(CreateDetObject(av));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue