diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 5694c8c..8e74dc8 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -2626,14 +2626,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
2626 | 2626 | ||
2627 | private void SendLandCollisionEvent(scriptEvents ev, ScriptCollidingNotification notify) | 2627 | private void SendLandCollisionEvent(scriptEvents ev, ScriptCollidingNotification notify) |
2628 | { | 2628 | { |
2629 | if ((ParentGroup.RootPart.ScriptEvents & ev) != 0) | 2629 | bool sendToRoot = true; |
2630 | |||
2631 | ColliderArgs LandCollidingMessage = new ColliderArgs(); | ||
2632 | List<DetectedObject> colliding = new List<DetectedObject>(); | ||
2633 | |||
2634 | colliding.Add(CreateDetObjectForGround()); | ||
2635 | LandCollidingMessage.Colliders = colliding; | ||
2636 | |||
2637 | if (Inventory.ContainsScripts()) | ||
2630 | { | 2638 | { |
2631 | ColliderArgs LandCollidingMessage = new ColliderArgs(); | 2639 | if (!PassCollisions) |
2632 | List<DetectedObject> colliding = new List<DetectedObject>(); | 2640 | sendToRoot = false; |
2633 | 2641 | } | |
2634 | colliding.Add(CreateDetObjectForGround()); | 2642 | if ((ScriptEvents & ev) != 0) |
2635 | LandCollidingMessage.Colliders = colliding; | 2643 | notify(LocalId, LandCollidingMessage); |
2636 | 2644 | ||
2645 | if ((ParentGroup.RootPart.ScriptEvents & ev) != 0 && sendToRoot) | ||
2646 | { | ||
2637 | notify(ParentGroup.RootPart.LocalId, LandCollidingMessage); | 2647 | notify(ParentGroup.RootPart.LocalId, LandCollidingMessage); |
2638 | } | 2648 | } |
2639 | } | 2649 | } |