aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2017-10-13 20:00:38 +0100
committerUbitUmarov2017-10-13 20:00:38 +0100
commitdd58f15bffdefe340da7780421753bcf2ca831cd (patch)
treeeb53356f14235c664af151a3f86f9e98008e7bd6 /OpenSim/Region
parentremove a dead line of code (diff)
downloadopensim-SC-dd58f15bffdefe340da7780421753bcf2ca831cd.zip
opensim-SC-dd58f15bffdefe340da7780421753bcf2ca831cd.tar.gz
opensim-SC-dd58f15bffdefe340da7780421753bcf2ca831cd.tar.bz2
opensim-SC-dd58f15bffdefe340da7780421753bcf2ca831cd.tar.xz
mantis 8249: give better data to llDetectedGrab
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 4fef9c3..3fde5f1 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -306,14 +306,14 @@ namespace OpenSim.Region.Framework.Scenes
306 306
307 // If the touched prim handles touches, deliver it 307 // If the touched prim handles touches, deliver it
308 if ((part.ScriptEvents & scriptEvents.touch_start) != 0) 308 if ((part.ScriptEvents & scriptEvents.touch_start) != 0)
309 EventManager.TriggerObjectGrab(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg); 309 EventManager.TriggerObjectGrab(part.LocalId, 0, offsetPos, remoteClient, surfaceArg);
310 310
311 // Deliver to the root prim if the touched prim doesn't handle touches 311 // Deliver to the root prim if the touched prim doesn't handle touches
312 // or if we're meant to pass on touches anyway. 312 // or if we're meant to pass on touches anyway.
313 if (((part.ScriptEvents & scriptEvents.touch_start) == 0) || 313 if (((part.ScriptEvents & scriptEvents.touch_start) == 0) ||
314 (part.PassTouches && (part.LocalId != obj.RootPart.LocalId))) 314 (part.PassTouches && (part.LocalId != obj.RootPart.LocalId)))
315 { 315 {
316 EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg); 316 EventManager.TriggerObjectGrab(obj.RootPart.LocalId, part.LocalId, offsetPos, remoteClient, surfaceArg);
317 } 317 }
318 } 318 }
319 319
@@ -343,15 +343,18 @@ namespace OpenSim.Region.Framework.Scenes
343 if (surfaceArgs != null && surfaceArgs.Count > 0) 343 if (surfaceArgs != null && surfaceArgs.Count > 0)
344 surfaceArg = surfaceArgs[0]; 344 surfaceArg = surfaceArgs[0];
345 345
346 Vector3 grabOffset = pos - part.AbsolutePosition;
346 // If the touched prim handles touches, deliver it 347 // If the touched prim handles touches, deliver it
347 if ((part.ScriptEvents & scriptEvents.touch) != 0) 348 if ((part.ScriptEvents & scriptEvents.touch) != 0)
348 EventManager.TriggerObjectGrabbing(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg); 349// EventManager.TriggerObjectGrabbing(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg);
350 EventManager.TriggerObjectGrabbing(part.LocalId, 0, grabOffset, remoteClient, surfaceArg);
349 // Deliver to the root prim if the touched prim doesn't handle touches 351 // Deliver to the root prim if the touched prim doesn't handle touches
350 // or if we're meant to pass on touches anyway. 352 // or if we're meant to pass on touches anyway.
351 if (((part.ScriptEvents & scriptEvents.touch) == 0) || 353 if (((part.ScriptEvents & scriptEvents.touch) == 0) ||
352 (part.PassTouches && (part.LocalId != group.RootPart.LocalId))) 354 (part.PassTouches && (part.LocalId != group.RootPart.LocalId)))
353 { 355 {
354 EventManager.TriggerObjectGrabbing(group.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg); 356// EventManager.TriggerObjectGrabbing(group.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg);
357 EventManager.TriggerObjectGrabbing(group.RootPart.LocalId, part.LocalId, grabOffset, remoteClient, surfaceArg);
355 } 358 }
356 } 359 }
357 360