aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Client/MXP/ClientStack/MXPClientView.cs2
-rw-r--r--OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs2
-rw-r--r--OpenSim/Framework/IClientAPI.cs5
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs21
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs10
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs2
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/EventManager.cs8
-rw-r--r--OpenSim/Tests/Common/Mock/TestClient.cs2
12 files changed, 52 insertions, 18 deletions
diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
index 1ae01cc..660bb3e 100644
--- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
+++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
@@ -605,7 +605,7 @@ namespace OpenSim.Client.MXP.ClientStack
605 public event ObjectDuplicate OnObjectDuplicate; 605 public event ObjectDuplicate OnObjectDuplicate;
606 public event ObjectDuplicateOnRay OnObjectDuplicateOnRay; 606 public event ObjectDuplicateOnRay OnObjectDuplicateOnRay;
607 public event GrabObject OnGrabObject; 607 public event GrabObject OnGrabObject;
608 public event ObjectSelect OnDeGrabObject; 608 public event DeGrabObject OnDeGrabObject;
609 public event MoveObject OnGrabUpdate; 609 public event MoveObject OnGrabUpdate;
610 public event SpinStart OnSpinStart; 610 public event SpinStart OnSpinStart;
611 public event SpinObject OnSpinUpdate; 611 public event SpinObject OnSpinUpdate;
diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
index 011392e..225ef69 100644
--- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
+++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs
@@ -252,7 +252,7 @@ namespace OpenSim.Client.VWoHTTP.ClientStack
252 public event ObjectDuplicate OnObjectDuplicate = delegate { }; 252 public event ObjectDuplicate OnObjectDuplicate = delegate { };
253 public event ObjectDuplicateOnRay OnObjectDuplicateOnRay = delegate { }; 253 public event ObjectDuplicateOnRay OnObjectDuplicateOnRay = delegate { };
254 public event GrabObject OnGrabObject = delegate { }; 254 public event GrabObject OnGrabObject = delegate { };
255 public event ObjectSelect OnDeGrabObject = delegate { }; 255 public event DeGrabObject OnDeGrabObject = delegate { };
256 public event MoveObject OnGrabUpdate = delegate { }; 256 public event MoveObject OnGrabUpdate = delegate { };
257 public event SpinStart OnSpinStart = delegate { }; 257 public event SpinStart OnSpinStart = delegate { };
258 public event SpinObject OnSpinUpdate = delegate { }; 258 public event SpinObject OnSpinUpdate = delegate { };
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 5d169cf..2a81d5c 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -155,6 +155,9 @@ namespace OpenSim.Framework
155 public delegate void GrabObject( 155 public delegate void GrabObject(
156 uint localID, Vector3 pos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs); 156 uint localID, Vector3 pos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs);
157 157
158 public delegate void DeGrabObject(
159 uint localID, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs);
160
158 public delegate void MoveObject( 161 public delegate void MoveObject(
159 UUID objectID, Vector3 offset, Vector3 grapPos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs 162 UUID objectID, Vector3 offset, Vector3 grapPos, IClientAPI remoteClient, List<SurfaceTouchEventArgs> surfaceArgs
160 ); 163 );
@@ -609,7 +612,7 @@ namespace OpenSim.Framework
609 event ObjectDuplicate OnObjectDuplicate; 612 event ObjectDuplicate OnObjectDuplicate;
610 event ObjectDuplicateOnRay OnObjectDuplicateOnRay; 613 event ObjectDuplicateOnRay OnObjectDuplicateOnRay;
611 event GrabObject OnGrabObject; 614 event GrabObject OnGrabObject;
612 event ObjectSelect OnDeGrabObject; 615 event DeGrabObject OnDeGrabObject;
613 event MoveObject OnGrabUpdate; 616 event MoveObject OnGrabUpdate;
614 event SpinStart OnSpinStart; 617 event SpinStart OnSpinStart;
615 event SpinObject OnSpinUpdate; 618 event SpinObject OnSpinUpdate;
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
197 private UpdatePrimTexture handlerUpdatePrimTexture; 197 private UpdatePrimTexture handlerUpdatePrimTexture;
198 private GrabObject handlerGrabObject; //OnGrabObject; 198 private GrabObject handlerGrabObject; //OnGrabObject;
199 private MoveObject handlerGrabUpdate; //OnGrabUpdate; 199 private MoveObject handlerGrabUpdate; //OnGrabUpdate;
200 private ObjectSelect handlerDeGrabObject; //OnDeGrabObject; 200 private DeGrabObject handlerDeGrabObject; //OnDeGrabObject;
201 private SpinStart handlerSpinStart; //OnSpinStart; 201 private SpinStart handlerSpinStart; //OnSpinStart;
202 private SpinObject handlerSpinUpdate; //OnSpinUpdate; 202 private SpinObject handlerSpinUpdate; //OnSpinUpdate;
203 private SpinStop handlerSpinStop; //OnSpinStop; 203 private SpinStop handlerSpinStop; //OnSpinStop;
@@ -1021,7 +1021,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1021 public event LinkObjects OnLinkObjects; 1021 public event LinkObjects OnLinkObjects;
1022 public event DelinkObjects OnDelinkObjects; 1022 public event DelinkObjects OnDelinkObjects;
1023 public event GrabObject OnGrabObject; 1023 public event GrabObject OnGrabObject;
1024 public event ObjectSelect OnDeGrabObject; 1024 public event DeGrabObject OnDeGrabObject;
1025 public event SpinStart OnSpinStart; 1025 public event SpinStart OnSpinStart;
1026 public event SpinStop OnSpinStop; 1026 public event SpinStop OnSpinStop;
1027 public event ObjectDuplicate OnObjectDuplicate; 1027 public event ObjectDuplicate OnObjectDuplicate;
@@ -5991,7 +5991,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5991 handlerDeGrabObject = OnDeGrabObject; 5991 handlerDeGrabObject = OnDeGrabObject;
5992 if (handlerDeGrabObject != null) 5992 if (handlerDeGrabObject != null)
5993 { 5993 {
5994 handlerDeGrabObject(deGrab.ObjectData.LocalID, this); 5994 List<SurfaceTouchEventArgs> touchArgs = new List<SurfaceTouchEventArgs>();
5995 if ((deGrab.SurfaceInfo != null) && (deGrab.SurfaceInfo.Length > 0))
5996 {
5997 foreach (ObjectDeGrabPacket.SurfaceInfoBlock surfaceInfo in deGrab.SurfaceInfo)
5998 {
5999 SurfaceTouchEventArgs arg = new SurfaceTouchEventArgs();
6000 arg.Binormal = surfaceInfo.Binormal;
6001 arg.FaceIndex = surfaceInfo.FaceIndex;
6002 arg.Normal = surfaceInfo.Normal;
6003 arg.Position = surfaceInfo.Position;
6004 arg.STCoord = surfaceInfo.STCoord;
6005 arg.UVCoord = surfaceInfo.UVCoord;
6006 touchArgs.Add(arg);
6007 }
6008 }
6009 handlerDeGrabObject(deGrab.ObjectData.LocalID, this, touchArgs);
5995 } 6010 }
5996 break; 6011 break;
5997 case PacketType.ObjectSpinStart: 6012 case PacketType.ObjectSpinStart:
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 2a2384b..f797dbc 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -94,7 +94,7 @@ namespace OpenSim.Region.Examples.SimpleModule
94 public event GodKickUser OnGodKickUser; 94 public event GodKickUser OnGodKickUser;
95 public event ObjectDuplicate OnObjectDuplicate; 95 public event ObjectDuplicate OnObjectDuplicate;
96 public event GrabObject OnGrabObject; 96 public event GrabObject OnGrabObject;
97 public event ObjectSelect OnDeGrabObject; 97 public event DeGrabObject OnDeGrabObject;
98 public event MoveObject OnGrabUpdate; 98 public event MoveObject OnGrabUpdate;
99 public event SpinStart OnSpinStart; 99 public event SpinStart OnSpinStart;
100 public event SpinObject OnSpinUpdate; 100 public event SpinObject OnSpinUpdate;
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 }
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index 9c6c44d..9002a21 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -679,7 +679,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
679 public event ObjectDuplicate OnObjectDuplicate; 679 public event ObjectDuplicate OnObjectDuplicate;
680 public event ObjectDuplicateOnRay OnObjectDuplicateOnRay; 680 public event ObjectDuplicateOnRay OnObjectDuplicateOnRay;
681 public event GrabObject OnGrabObject; 681 public event GrabObject OnGrabObject;
682 public event ObjectSelect OnDeGrabObject; 682 public event DeGrabObject OnDeGrabObject;
683 public event MoveObject OnGrabUpdate; 683 public event MoveObject OnGrabUpdate;
684 public event SpinStart OnSpinStart; 684 public event SpinStart OnSpinStart;
685 public event SpinObject OnSpinUpdate; 685 public event SpinObject OnSpinUpdate;
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index cd559cb..0505fe8 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -200,7 +200,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
200 public event GodKickUser OnGodKickUser; 200 public event GodKickUser OnGodKickUser;
201 public event ObjectDuplicate OnObjectDuplicate; 201 public event ObjectDuplicate OnObjectDuplicate;
202 public event GrabObject OnGrabObject; 202 public event GrabObject OnGrabObject;
203 public event ObjectSelect OnDeGrabObject; 203 public event DeGrabObject OnDeGrabObject;
204 public event MoveObject OnGrabUpdate; 204 public event MoveObject OnGrabUpdate;
205 public event SpinStart OnSpinStart; 205 public event SpinStart OnSpinStart;
206 public event SpinObject OnSpinUpdate; 206 public event SpinObject OnSpinUpdate;
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs
index b97f62e..dc49549 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs
@@ -208,7 +208,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
208 det)); 208 det));
209 } 209 }
210 210
211 public void touch_end(uint localID, uint originalID, IClientAPI remoteClient) 211 public void touch_end(uint localID, uint originalID, IClientAPI remoteClient,
212 SurfaceTouchEventArgs surfaceArgs)
212 { 213 {
213 // Add to queue for all scripts in ObjectID object 214 // Add to queue for all scripts in ObjectID object
214 DetectParams[] det = new DetectParams[1]; 215 DetectParams[] det = new DetectParams[1];
@@ -232,6 +233,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
232 det[0].LinkNum = originalPart.LinkNum; 233 det[0].LinkNum = originalPart.LinkNum;
233 } 234 }
234 235
236 if (surfaceArgs != null)
237 {
238 det[0].SurfaceTouchArgs = surfaceArgs;
239 }
240
235 myScriptEngine.PostObjectEvent(localID, new EventParams( 241 myScriptEngine.PostObjectEvent(localID, new EventParams(
236 "touch_end", new Object[] { new LSL_Types.LSLInteger(1) }, 242 "touch_end", new Object[] { new LSL_Types.LSLInteger(1) },
237 det)); 243 det));
diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
index e4db0b5..3b9ff2e 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
@@ -156,7 +156,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
156 det)); 156 det));
157 } 157 }
158 158
159 public void touch_end(uint localID, uint originalID, IClientAPI remoteClient) 159 public void touch_end(uint localID, uint originalID, IClientAPI remoteClient,
160 SurfaceTouchEventArgs surfaceArgs)
160 { 161 {
161 // Add to queue for all scripts in ObjectID object 162 // Add to queue for all scripts in ObjectID object
162 DetectParams[] det = new DetectParams[1]; 163 DetectParams[] det = new DetectParams[1];
@@ -178,6 +179,11 @@ namespace OpenSim.Region.ScriptEngine.XEngine
178 det[0].LinkNum = originalPart.LinkNum; 179 det[0].LinkNum = originalPart.LinkNum;
179 } 180 }
180 181
182 if (surfaceArgs != null)
183 {
184 det[0].SurfaceTouchArgs = surfaceArgs;
185 }
186
181 myScriptEngine.PostObjectEvent(localID, new EventParams( 187 myScriptEngine.PostObjectEvent(localID, new EventParams(
182 "touch_end", new Object[] { new LSL_Types.LSLInteger(1) }, 188 "touch_end", new Object[] { new LSL_Types.LSLInteger(1) },
183 det)); 189 det));
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index fdca410..64af13d 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -106,7 +106,7 @@ namespace OpenSim.Tests.Common.Mock
106 public event GodKickUser OnGodKickUser; 106 public event GodKickUser OnGodKickUser;
107 public event ObjectDuplicate OnObjectDuplicate; 107 public event ObjectDuplicate OnObjectDuplicate;
108 public event GrabObject OnGrabObject; 108 public event GrabObject OnGrabObject;
109 public event ObjectSelect OnDeGrabObject; 109 public event DeGrabObject OnDeGrabObject;
110 public event MoveObject OnGrabUpdate; 110 public event MoveObject OnGrabUpdate;
111 public event SpinStart OnSpinStart; 111 public event SpinStart OnSpinStart;
112 public event SpinObject OnSpinUpdate; 112 public event SpinObject OnSpinUpdate;