aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorSean Dague2009-06-19 12:21:20 +0000
committerSean Dague2009-06-19 12:21:20 +0000
commit1adeb8ad7781beecbf1f23817eb9047e57f12027 (patch)
treed6ea15f8cd678fed3025b8a2934ca5f02c589635 /OpenSim/Region/Framework/Scenes
parentmore type clean fixes for mono 2.4.2 (diff)
downloadopensim-SC_OLD-1adeb8ad7781beecbf1f23817eb9047e57f12027.zip
opensim-SC_OLD-1adeb8ad7781beecbf1f23817eb9047e57f12027.tar.gz
opensim-SC_OLD-1adeb8ad7781beecbf1f23817eb9047e57f12027.tar.bz2
opensim-SC_OLD-1adeb8ad7781beecbf1f23817eb9047e57f12027.tar.xz
From: Chris Yeoh <yeohc@au1.ibm.com>
This patch ensures that the touch positions are set during touch_end events (currently only working for touch_start and touch events).
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs10
2 files changed, 10 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index cb15434..08ec1aa 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -93,7 +93,7 @@ namespace OpenSim.Region.Framework.Scenes
93 public event OnShutdownDelegate OnShutdown; 93 public event OnShutdownDelegate OnShutdown;
94 94
95 public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs); 95 public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs);
96 public delegate void ObjectDeGrabDelegate(uint localID, uint originalID, IClientAPI remoteClient); 96 public delegate void ObjectDeGrabDelegate(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs);
97 public delegate void ScriptResetDelegate(uint localID, UUID itemID); 97 public delegate void ScriptResetDelegate(uint localID, UUID itemID);
98 98
99 public delegate void OnPermissionErrorDelegate(UUID user, string reason); 99 public delegate void OnPermissionErrorDelegate(UUID user, string reason);
@@ -582,12 +582,12 @@ namespace OpenSim.Region.Framework.Scenes
582 } 582 }
583 } 583 }
584 584
585 public void TriggerObjectDeGrab(uint localID, uint originalID, IClientAPI remoteClient) 585 public void TriggerObjectDeGrab(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs)
586 { 586 {
587 handlerObjectDeGrab = OnObjectDeGrab; 587 handlerObjectDeGrab = OnObjectDeGrab;
588 if (handlerObjectDeGrab != null) 588 if (handlerObjectDeGrab != null)
589 { 589 {
590 handlerObjectDeGrab(localID, originalID, remoteClient); 590 handlerObjectDeGrab(localID, originalID, remoteClient, surfaceArgs);
591 } 591 }
592 } 592 }
593 593
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index e0de029..9251aa6 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -269,10 +269,14 @@ namespace OpenSim.Region.Framework.Scenes
269 } 269 }
270 } 270 }
271 271
272 public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient) 272 public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs)
273 { 273 {
274 List<EntityBase> EntityList = GetEntities(); 274 List<EntityBase> EntityList = GetEntities();
275 275
276 SurfaceTouchEventArgs surfaceArg = null;
277 if (surfaceArgs != null && surfaceArgs.Count > 0)
278 surfaceArg = surfaceArgs[0];
279
276 foreach (EntityBase ent in EntityList) 280 foreach (EntityBase ent in EntityList)
277 { 281 {
278 if (ent is SceneObjectGroup) 282 if (ent is SceneObjectGroup)
@@ -288,9 +292,9 @@ namespace OpenSim.Region.Framework.Scenes
288 // If the touched prim handles touches, deliver it 292 // If the touched prim handles touches, deliver it
289 // If not, deliver to root prim 293 // If not, deliver to root prim
290 if ((part.ScriptEvents & scriptEvents.touch_end) != 0) 294 if ((part.ScriptEvents & scriptEvents.touch_end) != 0)
291 EventManager.TriggerObjectDeGrab(part.LocalId, 0, remoteClient); 295 EventManager.TriggerObjectDeGrab(part.LocalId, 0, remoteClient, surfaceArg);
292 else 296 else
293 EventManager.TriggerObjectDeGrab(obj.RootPart.LocalId, part.LocalId, remoteClient); 297 EventManager.TriggerObjectDeGrab(obj.RootPart.LocalId, part.LocalId, remoteClient, surfaceArg);
294 298
295 return; 299 return;
296 } 300 }