From 1adeb8ad7781beecbf1f23817eb9047e57f12027 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Fri, 19 Jun 2009 12:21:20 +0000 Subject: From: Chris Yeoh This patch ensures that the touch positions are set during touch_end events (currently only working for touch_start and touch events). --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 98c84ae..1109e77 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -197,7 +197,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP private UpdatePrimTexture handlerUpdatePrimTexture; private GrabObject handlerGrabObject; //OnGrabObject; private MoveObject handlerGrabUpdate; //OnGrabUpdate; - private ObjectSelect handlerDeGrabObject; //OnDeGrabObject; + private DeGrabObject handlerDeGrabObject; //OnDeGrabObject; private SpinStart handlerSpinStart; //OnSpinStart; private SpinObject handlerSpinUpdate; //OnSpinUpdate; private SpinStop handlerSpinStop; //OnSpinStop; @@ -1021,7 +1021,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP public event LinkObjects OnLinkObjects; public event DelinkObjects OnDelinkObjects; public event GrabObject OnGrabObject; - public event ObjectSelect OnDeGrabObject; + public event DeGrabObject OnDeGrabObject; public event SpinStart OnSpinStart; public event SpinStop OnSpinStop; public event ObjectDuplicate OnObjectDuplicate; @@ -5991,7 +5991,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP handlerDeGrabObject = OnDeGrabObject; if (handlerDeGrabObject != null) { - handlerDeGrabObject(deGrab.ObjectData.LocalID, this); + List touchArgs = new List(); + if ((deGrab.SurfaceInfo != null) && (deGrab.SurfaceInfo.Length > 0)) + { + foreach (ObjectDeGrabPacket.SurfaceInfoBlock surfaceInfo in deGrab.SurfaceInfo) + { + SurfaceTouchEventArgs arg = new SurfaceTouchEventArgs(); + arg.Binormal = surfaceInfo.Binormal; + arg.FaceIndex = surfaceInfo.FaceIndex; + arg.Normal = surfaceInfo.Normal; + arg.Position = surfaceInfo.Position; + arg.STCoord = surfaceInfo.STCoord; + arg.UVCoord = surfaceInfo.UVCoord; + touchArgs.Add(arg); + } + } + handlerDeGrabObject(deGrab.ObjectData.LocalID, this, touchArgs); } break; case PacketType.ObjectSpinStart: -- cgit v1.1