aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
diff options
context:
space:
mode:
authorUbitUmarov2016-09-16 19:23:56 +0100
committerUbitUmarov2016-09-16 19:23:56 +0100
commitfb46eb3344f50aecf2796e3940a66ee6e3d57915 (patch)
tree2b19409bf423191a401289750944cb8c2a25f787 /OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
parentMinor. Remove unused integer arrays from TerrainModule (diff)
downloadopensim-SC-fb46eb3344f50aecf2796e3940a66ee6e3d57915.zip
opensim-SC-fb46eb3344f50aecf2796e3940a66ee6e3d57915.tar.gz
opensim-SC-fb46eb3344f50aecf2796e3940a66ee6e3d57915.tar.bz2
opensim-SC-fb46eb3344f50aecf2796e3940a66ee6e3d57915.tar.xz
pass touch_end as other touchs, make blockgrab work on nonphysical also
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs19
1 files changed, 9 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 4d491d1..d27af09 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -340,13 +340,11 @@ namespace OpenSim.Region.Framework.Scenes
340 obj.ObjectGrabHandler(localID, offsetPos, remoteClient); 340 obj.ObjectGrabHandler(localID, offsetPos, remoteClient);
341 341
342 // If the touched prim handles touches, deliver it 342 // If the touched prim handles touches, deliver it
343 // If not, deliver to root prim
344 if ((part.ScriptEvents & scriptEvents.touch_start) != 0) 343 if ((part.ScriptEvents & scriptEvents.touch_start) != 0)
345 EventManager.TriggerObjectGrab(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg); 344 EventManager.TriggerObjectGrab(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg);
346 345
347 // Deliver to the root prim if the touched prim doesn't handle touches 346 // Deliver to the root prim if the touched prim doesn't handle touches
348 // or if we're meant to pass on touches anyway. Don't send to root prim 347 // or if we're meant to pass on touches anyway.
349 // if prim touched is the root prim as we just did it
350 if (((part.ScriptEvents & scriptEvents.touch_start) == 0) || 348 if (((part.ScriptEvents & scriptEvents.touch_start) == 0) ||
351 (part.PassTouches && (part.LocalId != obj.RootPart.LocalId))) 349 (part.PassTouches && (part.LocalId != obj.RootPart.LocalId)))
352 { 350 {
@@ -381,12 +379,10 @@ namespace OpenSim.Region.Framework.Scenes
381 surfaceArg = surfaceArgs[0]; 379 surfaceArg = surfaceArgs[0];
382 380
383 // If the touched prim handles touches, deliver it 381 // If the touched prim handles touches, deliver it
384 // If not, deliver to root prim
385 if ((part.ScriptEvents & scriptEvents.touch) != 0) 382 if ((part.ScriptEvents & scriptEvents.touch) != 0)
386 EventManager.TriggerObjectGrabbing(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg); 383 EventManager.TriggerObjectGrabbing(part.LocalId, 0, part.OffsetPosition, remoteClient, surfaceArg);
387 // Deliver to the root prim if the touched prim doesn't handle touches 384 // Deliver to the root prim if the touched prim doesn't handle touches
388 // or if we're meant to pass on touches anyway. Don't send to root prim 385 // or if we're meant to pass on touches anyway.
389 // if prim touched is the root prim as we just did it
390 if (((part.ScriptEvents & scriptEvents.touch) == 0) || 386 if (((part.ScriptEvents & scriptEvents.touch) == 0) ||
391 (part.PassTouches && (part.LocalId != group.RootPart.LocalId))) 387 (part.PassTouches && (part.LocalId != group.RootPart.LocalId)))
392 { 388 {
@@ -400,18 +396,21 @@ namespace OpenSim.Region.Framework.Scenes
400 if (part == null) 396 if (part == null)
401 return; 397 return;
402 398
403 SceneObjectGroup obj = part.ParentGroup; 399 SceneObjectGroup grp = part.ParentGroup;
404 400
405 SurfaceTouchEventArgs surfaceArg = null; 401 SurfaceTouchEventArgs surfaceArg = null;
406 if (surfaceArgs != null && surfaceArgs.Count > 0) 402 if (surfaceArgs != null && surfaceArgs.Count > 0)
407 surfaceArg = surfaceArgs[0]; 403 surfaceArg = surfaceArgs[0];
408 404
409 // If the touched prim handles touches, deliver it 405 // If the touched prim handles touches, deliver it
410 // If not, deliver to root prim
411 if ((part.ScriptEvents & scriptEvents.touch_end) != 0) 406 if ((part.ScriptEvents & scriptEvents.touch_end) != 0)
412 EventManager.TriggerObjectDeGrab(part.LocalId, 0, remoteClient, surfaceArg); 407 EventManager.TriggerObjectDeGrab(part.LocalId, 0, remoteClient, surfaceArg);
413 else 408 // if not or PassTouchs, send it also to root.
414 EventManager.TriggerObjectDeGrab(obj.RootPart.LocalId, part.LocalId, remoteClient, surfaceArg); 409 if (((part.ScriptEvents & scriptEvents.touch_end) == 0) ||
410 (part.PassTouches && (part.LocalId != grp.RootPart.LocalId)))
411 {
412 EventManager.TriggerObjectDeGrab(grp.RootPart.LocalId, part.LocalId, remoteClient, surfaceArg);
413 }
415 } 414 }
416 415
417 public void ProcessScriptReset(IClientAPI remoteClient, UUID objectID, 416 public void ProcessScriptReset(IClientAPI remoteClient, UUID objectID,