aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/EventManager.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/EventManager.cs71
1 files changed, 54 insertions, 17 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
index 8195f33..b2eab45 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
@@ -63,6 +63,9 @@ namespace OpenSim.Region.ScriptEngine.XEngine
63 myScriptEngine.World.EventManager.OnScriptColliderStart += collision_start; 63 myScriptEngine.World.EventManager.OnScriptColliderStart += collision_start;
64 myScriptEngine.World.EventManager.OnScriptColliding += collision; 64 myScriptEngine.World.EventManager.OnScriptColliding += collision;
65 myScriptEngine.World.EventManager.OnScriptCollidingEnd += collision_end; 65 myScriptEngine.World.EventManager.OnScriptCollidingEnd += collision_end;
66 myScriptEngine.World.EventManager.OnScriptLandColliderStart += land_collision_start;
67 myScriptEngine.World.EventManager.OnScriptLandColliding += land_collision;
68 myScriptEngine.World.EventManager.OnScriptLandColliderEnd += land_collision_end;
66 IMoneyModule money=myScriptEngine.World.RequestModuleInterface<IMoneyModule>(); 69 IMoneyModule money=myScriptEngine.World.RequestModuleInterface<IMoneyModule>();
67 if (money != null) 70 if (money != null)
68 { 71 {
@@ -285,29 +288,63 @@ namespace OpenSim.Region.ScriptEngine.XEngine
285 det.ToArray())); 288 det.ToArray()));
286 } 289 }
287 290
288 public void land_collision_start(uint localID, UUID itemID) 291 public void land_collision_start(uint localID, ColliderArgs col)
289 { 292 {
290 myScriptEngine.PostObjectEvent(localID, new EventParams( 293 List<DetectParams> det = new List<DetectParams>();
291 "land_collision_start", 294
292 new object[0], 295 foreach (DetectedObject detobj in col.Colliders)
293 new DetectParams[0])); 296 {
297 DetectParams d = new DetectParams();
298 d.Position = new LSL_Types.Vector3(detobj.posVector.X,
299 detobj.posVector.Y,
300 detobj.posVector.Z);
301 d.Populate(myScriptEngine.World);
302 det.Add(d);
303 myScriptEngine.PostObjectEvent(localID, new EventParams(
304 "land_collision_start",
305 new Object[] { new LSL_Types.Vector3(d.Position) },
306 det.ToArray()));
307 }
308
294 } 309 }
295 310
296 public void land_collision(uint localID, UUID itemID) 311 public void land_collision(uint localID, ColliderArgs col)
297 { 312 {
298 myScriptEngine.PostObjectEvent(localID, new EventParams( 313 List<DetectParams> det = new List<DetectParams>();
299 "land_collision", 314
300 new object[0], 315 foreach (DetectedObject detobj in col.Colliders)
301 new DetectParams[0])); 316 {
317 DetectParams d = new DetectParams();
318 d.Position = new LSL_Types.Vector3(detobj.posVector.X,
319 detobj.posVector.Y,
320 detobj.posVector.Z);
321 d.Populate(myScriptEngine.World);
322 det.Add(d);
323 myScriptEngine.PostObjectEvent(localID, new EventParams(
324 "land_collision",
325 new Object[] { new LSL_Types.Vector3(d.Position) },
326 det.ToArray()));
327 }
302 } 328 }
303 329
304 public void land_collision_end(uint localID, UUID itemID) 330 public void land_collision_end(uint localID, ColliderArgs col)
305 { 331 {
306 myScriptEngine.PostObjectEvent(localID, new EventParams( 332 List<DetectParams> det = new List<DetectParams>();
307 "land_collision_end", 333
308 new object[0], 334 foreach (DetectedObject detobj in col.Colliders)
309 new DetectParams[0])); 335 {
310 } 336 DetectParams d = new DetectParams();
337 d.Position = new LSL_Types.Vector3(detobj.posVector.X,
338 detobj.posVector.Y,
339 detobj.posVector.Z);
340 d.Populate(myScriptEngine.World);
341 det.Add(d);
342 myScriptEngine.PostObjectEvent(localID, new EventParams(
343 "land_collision_end",
344 new Object[] { new LSL_Types.Vector3(d.Position) },
345 det.ToArray()));
346 }
347 }
311 348
312 // timer: not handled here 349 // timer: not handled here
313 // listen: not handled here 350 // listen: not handled here