From 5525a3ecb424ce6180198b5f4e440d6d5f065346 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 27 Aug 2008 22:53:58 +0000 Subject: Thank you, salahazar, for a patch that corrects the behavior of llDetectedLink(). Also a small refactor to remove an interface member from IScriptEngine. --- OpenSim/Region/Environment/Scenes/EventManager.cs | 12 ++++++------ OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/EventManager.cs b/OpenSim/Region/Environment/Scenes/EventManager.cs index 1dd2273..d48ef0c 100644 --- a/OpenSim/Region/Environment/Scenes/EventManager.cs +++ b/OpenSim/Region/Environment/Scenes/EventManager.cs @@ -83,8 +83,8 @@ namespace OpenSim.Region.Environment.Scenes public event OnShutdownDelegate OnShutdown; - public delegate void ObjectGrabDelegate(uint localID, LLVector3 offsetPos, IClientAPI remoteClient); - public delegate void ObjectDeGrabDelegate(uint localID, IClientAPI remoteClient); + public delegate void ObjectGrabDelegate(uint localID, uint originalID, LLVector3 offsetPos, IClientAPI remoteClient); + public delegate void ObjectDeGrabDelegate(uint localID, uint originalID, IClientAPI remoteClient); public delegate void ScriptResetDelegate(uint localID, LLUUID itemID); public delegate void OnPermissionErrorDelegate(LLUUID user, string reason); @@ -492,21 +492,21 @@ namespace OpenSim.Region.Environment.Scenes handlerShutdown(); } - public void TriggerObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) + public void TriggerObjectGrab(uint localID, uint originalID, LLVector3 offsetPos, IClientAPI remoteClient) { handlerObjectGrab = OnObjectGrab; if (handlerObjectGrab != null) { - handlerObjectGrab(localID, offsetPos, remoteClient); + handlerObjectGrab(localID, originalID, offsetPos, remoteClient); } } - public void TriggerObjectDeGrab(uint localID, IClientAPI remoteClient) + public void TriggerObjectDeGrab(uint localID, uint originalID, IClientAPI remoteClient) { handlerObjectDeGrab = OnObjectDeGrab; if (handlerObjectDeGrab != null) { - handlerObjectDeGrab(localID, remoteClient); + handlerObjectDeGrab(localID, originalID, remoteClient); } } diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index d534ffc..14d6826 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs @@ -243,9 +243,9 @@ namespace OpenSim.Region.Environment.Scenes // If the touched prim handles touches, deliver it // If not, deliver to root prim if ((part.ScriptEvents & scriptEvents.touch_start) != 0) - EventManager.TriggerObjectGrab(part.LocalId, part.OffsetPosition, remoteClient); + EventManager.TriggerObjectGrab(part.LocalId, 0, part.OffsetPosition, remoteClient); else - EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.OffsetPosition, remoteClient); + EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient); return; } @@ -274,9 +274,9 @@ namespace OpenSim.Region.Environment.Scenes // If the touched prim handles touches, deliver it // If not, deliver to root prim if ((part.ScriptEvents & scriptEvents.touch_end) != 0) - EventManager.TriggerObjectDeGrab(part.LocalId, remoteClient); + EventManager.TriggerObjectDeGrab(part.LocalId, 0, remoteClient); else - EventManager.TriggerObjectDeGrab(obj.RootPart.LocalId, remoteClient); + EventManager.TriggerObjectDeGrab(obj.RootPart.LocalId, part.LocalId, remoteClient); return; } -- cgit v1.1