Fix land collisions to work like SL.

avinationmerge
Melanie 2012-06-05 01:53:25 +02:00
parent fd176aab8f
commit 170b820a11
1 changed files with 17 additions and 7 deletions

View File

@ -2626,14 +2626,24 @@ namespace OpenSim.Region.Framework.Scenes
private void SendLandCollisionEvent(scriptEvents ev, ScriptCollidingNotification notify) private void SendLandCollisionEvent(scriptEvents ev, ScriptCollidingNotification notify)
{ {
if ((ParentGroup.RootPart.ScriptEvents & ev) != 0) bool sendToRoot = true;
ColliderArgs LandCollidingMessage = new ColliderArgs();
List<DetectedObject> colliding = new List<DetectedObject>();
colliding.Add(CreateDetObjectForGround());
LandCollidingMessage.Colliders = colliding;
if (Inventory.ContainsScripts())
{ {
ColliderArgs LandCollidingMessage = new ColliderArgs(); if (!PassCollisions)
List<DetectedObject> colliding = new List<DetectedObject>(); sendToRoot = false;
}
colliding.Add(CreateDetObjectForGround()); if ((ScriptEvents & ev) != 0)
LandCollidingMessage.Colliders = colliding; notify(LocalId, LandCollidingMessage);
if ((ParentGroup.RootPart.ScriptEvents & ev) != 0 && sendToRoot)
{
notify(ParentGroup.RootPart.LocalId, LandCollidingMessage); notify(ParentGroup.RootPart.LocalId, LandCollidingMessage);
} }
} }