From 170b820a114e5a53e70d7f1624109239b182ec9f Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 5 Jun 2012 01:53:25 +0200 Subject: Fix land collisions to work like SL. --- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs') 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 private void SendLandCollisionEvent(scriptEvents ev, ScriptCollidingNotification notify) { - if ((ParentGroup.RootPart.ScriptEvents & ev) != 0) + bool sendToRoot = true; + + ColliderArgs LandCollidingMessage = new ColliderArgs(); + List colliding = new List(); + + colliding.Add(CreateDetObjectForGround()); + LandCollidingMessage.Colliders = colliding; + + if (Inventory.ContainsScripts()) { - ColliderArgs LandCollidingMessage = new ColliderArgs(); - List colliding = new List(); - - colliding.Add(CreateDetObjectForGround()); - LandCollidingMessage.Colliders = colliding; + if (!PassCollisions) + sendToRoot = false; + } + if ((ScriptEvents & ev) != 0) + notify(LocalId, LandCollidingMessage); + if ((ParentGroup.RootPart.ScriptEvents & ev) != 0 && sendToRoot) + { notify(ParentGroup.RootPart.LocalId, LandCollidingMessage); } } -- cgit v1.1