From 5be74427365c3b712099aba8f8345f5fd92ca2fc Mon Sep 17 00:00:00 2001 From: MW Date: Fri, 10 Oct 2008 16:01:59 +0000 Subject: added a list of SurfaceTouchEventArgs to the IClientAPI.OnGrabUpdate event, for the new surface touch parameters in 1.21 viewers. TODO: add the touch args to OnGrabObject and OnDeGrabObject. --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 17 ++++++++++++++++- OpenSim/Region/DataSnapshot/ObjectSnapshot.cs | 2 +- OpenSim/Region/Environment/Scenes/InnerScene.cs | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 563d83b..d82b0cc 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -4725,8 +4725,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (handlerGrabUpdate != null) { + List touchArgs = new List(); + if ((grabUpdate.SurfaceInfo != null) && (grabUpdate.SurfaceInfo.Length > 0)) + { + foreach (ObjectGrabUpdatePacket.SurfaceInfoBlock surfaceInfo in grabUpdate.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); + } + } handlerGrabUpdate(grabUpdate.ObjectData.ObjectID, grabUpdate.ObjectData.GrabOffsetInitial, - grabUpdate.ObjectData.GrabPosition, this); + grabUpdate.ObjectData.GrabPosition, this, touchArgs); } break; case PacketType.ObjectDeGrab: diff --git a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs index 49d9aec..c77de96 100644 --- a/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs +++ b/OpenSim/Region/DataSnapshot/ObjectSnapshot.cs @@ -68,7 +68,7 @@ namespace OpenSim.Region.DataSnapshot.Providers { this.Stale = true; }; client.OnDelinkObjects += delegate(List primIds) { this.Stale = true; }; client.OnGrabUpdate += delegate(UUID objectID, Vector3 offset, Vector3 grapPos, - IClientAPI remoteClient) { this.Stale = true; }; + IClientAPI remoteClient, List surfaceArgs) { this.Stale = true; }; client.OnObjectAttach += delegate(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot) { this.Stale = true; }; client.OnObjectDuplicate += delegate(uint localID, Vector3 offset, uint dupeFlags, UUID AgentID, diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 4840133..80d0151 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs @@ -1214,7 +1214,7 @@ namespace OpenSim.Region.Environment.Scenes /// /// /// - protected internal void MoveObject(UUID objectID, Vector3 offset, Vector3 pos, IClientAPI remoteClient) + protected internal void MoveObject(UUID objectID, Vector3 offset, Vector3 pos, IClientAPI remoteClient, List surfaceArgs) { SceneObjectGroup group = GetGroupByPrim(objectID); if (group != null) -- cgit v1.1