mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 11:57:03 +08:00
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).
This commit is contained in:
@@ -93,7 +93,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
public event OnShutdownDelegate OnShutdown;
|
||||
|
||||
public delegate void ObjectGrabDelegate(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs);
|
||||
public delegate void ObjectDeGrabDelegate(uint localID, uint originalID, IClientAPI remoteClient);
|
||||
public delegate void ObjectDeGrabDelegate(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs);
|
||||
public delegate void ScriptResetDelegate(uint localID, UUID itemID);
|
||||
|
||||
public delegate void OnPermissionErrorDelegate(UUID user, string reason);
|
||||
@@ -582,12 +582,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
public void TriggerObjectDeGrab(uint localID, uint originalID, IClientAPI remoteClient)
|
||||
public void TriggerObjectDeGrab(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs)
|
||||
{
|
||||
handlerObjectDeGrab = OnObjectDeGrab;
|
||||
if (handlerObjectDeGrab != null)
|
||||
{
|
||||
handlerObjectDeGrab(localID, originalID, remoteClient);
|
||||
handlerObjectDeGrab(localID, originalID, remoteClient, surfaceArgs);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -269,10 +269,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient)
|
||||
public virtual void ProcessObjectDeGrab(uint localID, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs)
|
||||
{
|
||||
List<EntityBase> EntityList = GetEntities();
|
||||
|
||||
SurfaceTouchEventArgs surfaceArg = null;
|
||||
if (surfaceArgs != null && surfaceArgs.Count > 0)
|
||||
surfaceArg = surfaceArgs[0];
|
||||
|
||||
foreach (EntityBase ent in EntityList)
|
||||
{
|
||||
if (ent is SceneObjectGroup)
|
||||
@@ -288,9 +292,9 @@ namespace OpenSim.Region.Framework.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, 0, remoteClient);
|
||||
EventManager.TriggerObjectDeGrab(part.LocalId, 0, remoteClient, surfaceArg);
|
||||
else
|
||||
EventManager.TriggerObjectDeGrab(obj.RootPart.LocalId, part.LocalId, remoteClient);
|
||||
EventManager.TriggerObjectDeGrab(obj.RootPart.LocalId, part.LocalId, remoteClient, surfaceArg);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user