diff options
author | Diva Canto | 2012-09-25 10:46:42 -0700 |
---|---|---|
committer | Diva Canto | 2012-09-25 10:46:42 -0700 |
commit | 77355295dadaf3be54ac29d6b3d30901e95c0a32 (patch) | |
tree | 1f44d639b3fe7ddc41344943fd346e31a840799a /OpenSim/Region/Framework/Scenes | |
parent | Deleted extraneous debug message (diff) | |
parent | Documenting object-related events (diff) | |
download | opensim-SC_OLD-77355295dadaf3be54ac29d6b3d30901e95c0a32.zip opensim-SC_OLD-77355295dadaf3be54ac29d6b3d30901e95c0a32.tar.gz opensim-SC_OLD-77355295dadaf3be54ac29d6b3d30901e95c0a32.tar.bz2 opensim-SC_OLD-77355295dadaf3be54ac29d6b3d30901e95c0a32.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/EventManager.cs | 192 |
1 files changed, 190 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 96e9797..e25fa94 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -345,15 +345,58 @@ namespace OpenSim.Region.Framework.Scenes | |||
345 | public event StopScript OnStopScript; | 345 | public event StopScript OnStopScript; |
346 | 346 | ||
347 | public delegate bool SceneGroupMoved(UUID groupID, Vector3 delta); | 347 | public delegate bool SceneGroupMoved(UUID groupID, Vector3 delta); |
348 | |||
349 | /// <summary> | ||
350 | /// Triggered when an object is moved. | ||
351 | /// </summary> | ||
352 | /// <remarks> | ||
353 | /// Triggered by <see cref="TriggerGroupMove"/> | ||
354 | /// in <see cref="SceneObjectGroup.UpdateGroupPosition"/>, | ||
355 | /// <see cref="SceneObjectGroup.GrabMovement"/> | ||
356 | /// </remarks> | ||
348 | public event SceneGroupMoved OnSceneGroupMove; | 357 | public event SceneGroupMoved OnSceneGroupMove; |
349 | 358 | ||
350 | public delegate void SceneGroupGrabed(UUID groupID, Vector3 offset, UUID userID); | 359 | public delegate void SceneGroupGrabed(UUID groupID, Vector3 offset, UUID userID); |
360 | |||
361 | /// <summary> | ||
362 | /// Triggered when an object is grabbed. | ||
363 | /// </summary> | ||
364 | /// <remarks> | ||
365 | /// Triggered by <see cref="TriggerGroupGrab"/> | ||
366 | /// in <see cref="SceneObjectGroup.OnGrabGroup"/> | ||
367 | /// via <see cref="SceneObjectGroup.ObjectGrabHandler"/> | ||
368 | /// via <see cref="Scene.ProcessObjectGrab"/> | ||
369 | /// via <see cref="OpenSim.Framework.IClientAPI.OnGrabObject"/> | ||
370 | /// via <see cref="OpenSim.Region.ClientStack.LindenUDP.LLClientView.HandleObjectGrab"/> | ||
371 | /// </remarks> | ||
351 | public event SceneGroupGrabed OnSceneGroupGrab; | 372 | public event SceneGroupGrabed OnSceneGroupGrab; |
352 | 373 | ||
353 | public delegate bool SceneGroupSpinStarted(UUID groupID); | 374 | public delegate bool SceneGroupSpinStarted(UUID groupID); |
375 | |||
376 | /// <summary> | ||
377 | /// Triggered when an object starts to spin. | ||
378 | /// </summary> | ||
379 | /// <remarks> | ||
380 | /// Triggered by <see cref="TriggerGroupSpinStart"/> | ||
381 | /// in <see cref="SceneObjectGroup.SpinStart"/> | ||
382 | /// via <see cref="SceneGraph.SpinStart"/> | ||
383 | /// via <see cref="OpenSim.Framework.IClientAPI.OnSpinStart"/> | ||
384 | /// via <see cref="OpenSim.Region.ClientStack.LindenUDP.LLClientView.HandleObjectSpinStart"/> | ||
385 | /// </remarks> | ||
354 | public event SceneGroupSpinStarted OnSceneGroupSpinStart; | 386 | public event SceneGroupSpinStarted OnSceneGroupSpinStart; |
355 | 387 | ||
356 | public delegate bool SceneGroupSpun(UUID groupID, Quaternion rotation); | 388 | public delegate bool SceneGroupSpun(UUID groupID, Quaternion rotation); |
389 | |||
390 | /// <summary> | ||
391 | /// Triggered when an object is being spun. | ||
392 | /// </summary> | ||
393 | /// <remarks> | ||
394 | /// Triggered by <see cref="TriggerGroupSpin"/> | ||
395 | /// in <see cref="SceneObjectGroup.SpinMovement"/> | ||
396 | /// via <see cref="SceneGraph.SpinObject"/> | ||
397 | /// via <see cref="OpenSim.Framework.IClientAPI.OnSpinUpdate"/> | ||
398 | /// via <see cref="OpenSim.Region.ClientStack.LindenUDP.LLClientView.HandleObjectSpinUpdate"/> | ||
399 | /// </remarks> | ||
357 | public event SceneGroupSpun OnSceneGroupSpin; | 400 | public event SceneGroupSpun OnSceneGroupSpin; |
358 | 401 | ||
359 | public delegate void LandObjectAdded(ILandObject newParcel); | 402 | public delegate void LandObjectAdded(ILandObject newParcel); |
@@ -460,36 +503,170 @@ namespace OpenSim.Region.Framework.Scenes | |||
460 | } | 503 | } |
461 | 504 | ||
462 | /// <summary> | 505 | /// <summary> |
506 | /// Triggered when some scene object properties change. | ||
507 | /// </summary> | ||
508 | /// <remarks> | ||
463 | /// ScriptChangedEvent is fired when a scene object property that a script might be interested | 509 | /// ScriptChangedEvent is fired when a scene object property that a script might be interested |
464 | /// in (such as color, scale or inventory) changes. Only enough information sent is for the LSL changed event. | 510 | /// in (such as color, scale or inventory) changes. Only enough information sent is for the LSL changed event. |
465 | /// This is not an indication that the script has changed (see OnUpdateScript for that). | 511 | /// This is not an indication that the script has changed (see OnUpdateScript for that). |
466 | /// This event is sent to a script to tell it that some property changed on | 512 | /// This event is sent to a script to tell it that some property changed on |
467 | /// the object the script is in. See http://lslwiki.net/lslwiki/wakka.php?wakka=changed . | 513 | /// the object the script is in. See http://lslwiki.net/lslwiki/wakka.php?wakka=changed . |
468 | /// </summary> | 514 | /// Triggered by <see cref="TriggerOnScriptChangedEvent"/> |
515 | /// in <see cref="OpenSim.Region.CoreModules.Framework.EntityTransfer.EntityTransferModule.TeleportAgentWithinRegion"/>, | ||
516 | /// <see cref="SceneObjectPart.TriggerScriptChangedEvent"/> | ||
517 | /// </remarks> | ||
469 | public event ScriptChangedEvent OnScriptChangedEvent; | 518 | public event ScriptChangedEvent OnScriptChangedEvent; |
470 | public delegate void ScriptChangedEvent(uint localID, uint change); | 519 | public delegate void ScriptChangedEvent(uint localID, uint change); |
471 | 520 | ||
472 | public delegate void ScriptControlEvent(UUID item, UUID avatarID, uint held, uint changed); | 521 | public delegate void ScriptControlEvent(UUID item, UUID avatarID, uint held, uint changed); |
522 | |||
523 | /// <summary> | ||
524 | /// Triggered when a script receives control input from an agent. | ||
525 | /// </summary> | ||
526 | /// <remarks> | ||
527 | /// Triggered by <see cref="TriggerControlEvent"/> | ||
528 | /// in <see cref="ScenePresence.SendControlsToScripts"/> | ||
529 | /// via <see cref="ScenePresence.HandleAgentUpdate"/> | ||
530 | /// via <see cref="OpenSim.Framework.IClientAPI.OnAgentUpdate"/> | ||
531 | /// via <see cref="OpenSim.Region.ClientStack.LindenUDP.LLClientView.HandleAgentUpdate"/> | ||
532 | /// </remarks> | ||
473 | public event ScriptControlEvent OnScriptControlEvent; | 533 | public event ScriptControlEvent OnScriptControlEvent; |
474 | 534 | ||
475 | public delegate void ScriptAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 atpos); | 535 | public delegate void ScriptAtTargetEvent(uint localID, uint handle, Vector3 targetpos, Vector3 atpos); |
536 | |||
537 | /// <summary> | ||
538 | /// Triggered when an object has arrived within a tolerance distance | ||
539 | /// of a motion target. | ||
540 | /// </summary> | ||
541 | /// <remarks> | ||
542 | /// Triggered by <see cref="TriggerAtTargetEvent"/> | ||
543 | /// in <see cref="SceneObjectGroup.checkAtTargets"/> | ||
544 | /// via <see cref="SceneObjectGroup.ScheduleGroupForFullUpdate"/>, | ||
545 | /// <see cref="Scene.CheckAtTargets"/> via <see cref="Scene.Update"/> | ||
546 | /// </remarks> | ||
476 | public event ScriptAtTargetEvent OnScriptAtTargetEvent; | 547 | public event ScriptAtTargetEvent OnScriptAtTargetEvent; |
477 | 548 | ||
478 | public delegate void ScriptNotAtTargetEvent(uint localID); | 549 | public delegate void ScriptNotAtTargetEvent(uint localID); |
550 | |||
551 | /// <summary> | ||
552 | /// Triggered when an object has a motion target but has not arrived | ||
553 | /// within a tolerance distance. | ||
554 | /// </summary> | ||
555 | /// <remarks> | ||
556 | /// Triggered by <see cref="TriggerNotAtTargetEvent"/> | ||
557 | /// in <see cref="SceneObjectGroup.checkAtTargets"/> | ||
558 | /// via <see cref="SceneObjectGroup.ScheduleGroupForFullUpdate"/>, | ||
559 | /// <see cref="Scene.CheckAtTargets"/> via <see cref="Scene.Update"/> | ||
560 | /// </remarks> | ||
479 | public event ScriptNotAtTargetEvent OnScriptNotAtTargetEvent; | 561 | public event ScriptNotAtTargetEvent OnScriptNotAtTargetEvent; |
480 | 562 | ||
481 | public delegate void ScriptAtRotTargetEvent(uint localID, uint handle, Quaternion targetrot, Quaternion atrot); | 563 | public delegate void ScriptAtRotTargetEvent(uint localID, uint handle, Quaternion targetrot, Quaternion atrot); |
564 | |||
565 | /// <summary> | ||
566 | /// Triggered when an object has arrived within a tolerance rotation | ||
567 | /// of a rotation target. | ||
568 | /// </summary> | ||
569 | /// <remarks> | ||
570 | /// Triggered by <see cref="TriggerAtRotTargetEvent"/> | ||
571 | /// in <see cref="SceneObjectGroup.checkAtTargets"/> | ||
572 | /// via <see cref="SceneObjectGroup.ScheduleGroupForFullUpdate"/>, | ||
573 | /// <see cref="Scene.CheckAtTargets"/> via <see cref="Scene.Update"/> | ||
574 | /// </remarks> | ||
482 | public event ScriptAtRotTargetEvent OnScriptAtRotTargetEvent; | 575 | public event ScriptAtRotTargetEvent OnScriptAtRotTargetEvent; |
483 | 576 | ||
484 | public delegate void ScriptNotAtRotTargetEvent(uint localID); | 577 | public delegate void ScriptNotAtRotTargetEvent(uint localID); |
578 | |||
579 | /// <summary> | ||
580 | /// Triggered when an object has a rotation target but has not arrived | ||
581 | /// within a tolerance rotation. | ||
582 | /// </summary> | ||
583 | /// <remarks> | ||
584 | /// Triggered by <see cref="TriggerNotAtRotTargetEvent"/> | ||
585 | /// in <see cref="SceneObjectGroup.checkAtTargets"/> | ||
586 | /// via <see cref="SceneObjectGroup.ScheduleGroupForFullUpdate"/>, | ||
587 | /// <see cref="Scene.CheckAtTargets"/> via <see cref="Scene.Update"/> | ||
588 | /// </remarks> | ||
485 | public event ScriptNotAtRotTargetEvent OnScriptNotAtRotTargetEvent; | 589 | public event ScriptNotAtRotTargetEvent OnScriptNotAtRotTargetEvent; |
486 | 590 | ||
487 | public delegate void ScriptColliding(uint localID, ColliderArgs colliders); | 591 | public delegate void ScriptColliding(uint localID, ColliderArgs colliders); |
592 | |||
593 | /// <summary> | ||
594 | /// Triggered when a physical collision has started between a prim | ||
595 | /// and something other than the region terrain. | ||
596 | /// </summary> | ||
597 | /// <remarks> | ||
598 | /// Triggered by <see cref="TriggerScriptCollidingStart"/> | ||
599 | /// in <see cref="SceneObjectPart.SendCollisionEvent"/> | ||
600 | /// via <see cref="SceneObjectPart.PhysicsCollision"/> | ||
601 | /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.OnCollisionUpdate"/> | ||
602 | /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.SendCollisionUpdate"/> | ||
603 | /// </remarks> | ||
488 | public event ScriptColliding OnScriptColliderStart; | 604 | public event ScriptColliding OnScriptColliderStart; |
605 | |||
606 | /// <summary> | ||
607 | /// Triggered when something that previously collided with a prim has | ||
608 | /// not stopped colliding with it. | ||
609 | /// </summary> | ||
610 | /// <remarks> | ||
611 | /// <seealso cref="OnScriptColliderStart"/> | ||
612 | /// Triggered by <see cref="TriggerScriptColliding"/> | ||
613 | /// in <see cref="SceneObjectPart.SendCollisionEvent"/> | ||
614 | /// via <see cref="SceneObjectPart.PhysicsCollision"/> | ||
615 | /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.OnCollisionUpdate"/> | ||
616 | /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.SendCollisionUpdate"/> | ||
617 | /// </remarks> | ||
489 | public event ScriptColliding OnScriptColliding; | 618 | public event ScriptColliding OnScriptColliding; |
619 | |||
620 | /// <summary> | ||
621 | /// Triggered when something that previously collided with a prim has | ||
622 | /// stopped colliding with it. | ||
623 | /// </summary> | ||
624 | /// <remarks> | ||
625 | /// Triggered by <see cref="TriggerScriptCollidingEnd"/> | ||
626 | /// in <see cref="SceneObjectPart.SendCollisionEvent"/> | ||
627 | /// via <see cref="SceneObjectPart.PhysicsCollision"/> | ||
628 | /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.OnCollisionUpdate"/> | ||
629 | /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.SendCollisionUpdate"/> | ||
630 | /// </remarks> | ||
490 | public event ScriptColliding OnScriptCollidingEnd; | 631 | public event ScriptColliding OnScriptCollidingEnd; |
632 | |||
633 | /// <summary> | ||
634 | /// Triggered when a physical collision has started between an object | ||
635 | /// and the region terrain. | ||
636 | /// </summary> | ||
637 | /// <remarks> | ||
638 | /// Triggered by <see cref="TriggerScriptLandCollidingStart"/> | ||
639 | /// in <see cref="SceneObjectPart.SendLandCollisionEvent"/> | ||
640 | /// via <see cref="SceneObjectPart.PhysicsCollision"/> | ||
641 | /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.OnCollisionUpdate"/> | ||
642 | /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.SendCollisionUpdate"/> | ||
643 | /// </remarks> | ||
491 | public event ScriptColliding OnScriptLandColliderStart; | 644 | public event ScriptColliding OnScriptLandColliderStart; |
645 | |||
646 | /// <summary> | ||
647 | /// Triggered when an object that previously collided with the region | ||
648 | /// terrain has not yet stopped colliding with it. | ||
649 | /// </summary> | ||
650 | /// <remarks> | ||
651 | /// Triggered by <see cref="TriggerScriptLandColliding"/> | ||
652 | /// in <see cref="SceneObjectPart.SendLandCollisionEvent"/> | ||
653 | /// via <see cref="SceneObjectPart.PhysicsCollision"/> | ||
654 | /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.OnCollisionUpdate"/> | ||
655 | /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.SendCollisionUpdate"/> | ||
656 | /// </remarks> | ||
492 | public event ScriptColliding OnScriptLandColliding; | 657 | public event ScriptColliding OnScriptLandColliding; |
658 | |||
659 | /// <summary> | ||
660 | /// Triggered when an object that previously collided with the region | ||
661 | /// terrain has stopped colliding with it. | ||
662 | /// </summary> | ||
663 | /// <remarks> | ||
664 | /// Triggered by <see cref="TriggerScriptLandCollidingEnd"/> | ||
665 | /// in <see cref="SceneObjectPart.SendLandCollisionEvent"/> | ||
666 | /// via <see cref="SceneObjectPart.PhysicsCollision"/> | ||
667 | /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.OnCollisionUpdate"/> | ||
668 | /// via <see cref="OpenSim.Region.Physics.Manager.PhysicsActor.SendCollisionUpdate"/> | ||
669 | /// </remarks> | ||
493 | public event ScriptColliding OnScriptLandColliderEnd; | 670 | public event ScriptColliding OnScriptLandColliderEnd; |
494 | 671 | ||
495 | public delegate void OnMakeChildAgentDelegate(ScenePresence presence); | 672 | public delegate void OnMakeChildAgentDelegate(ScenePresence presence); |
@@ -550,6 +727,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
550 | 727 | ||
551 | /* | 728 | /* |
552 | public delegate void ScriptTimerEvent(uint localID, double timerinterval); | 729 | public delegate void ScriptTimerEvent(uint localID, double timerinterval); |
730 | /// <summary> | ||
731 | /// Used to be triggered when the LSL timer event fires. | ||
732 | /// </summary> | ||
733 | /// <remarks> | ||
734 | /// Triggered by <see cref="TriggerTimerEvent"/> | ||
735 | /// via <see cref="SceneObjectPart.handleTimerAccounting"/> | ||
736 | /// </remarks> | ||
553 | public event ScriptTimerEvent OnScriptTimerEvent; | 737 | public event ScriptTimerEvent OnScriptTimerEvent; |
554 | */ | 738 | */ |
555 | 739 | ||
@@ -2293,7 +2477,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2293 | } | 2477 | } |
2294 | } | 2478 | } |
2295 | 2479 | ||
2296 | // this lets us keep track of nasty script events like timer, etc. | 2480 | /// <summary> |
2481 | /// this lets us keep track of nasty script events like timer, etc. | ||
2482 | /// </summary> | ||
2483 | /// <param name="objLocalID"></param> | ||
2484 | /// <param name="Interval"></param> | ||
2297 | public void TriggerTimerEvent(uint objLocalID, double Interval) | 2485 | public void TriggerTimerEvent(uint objLocalID, double Interval) |
2298 | { | 2486 | { |
2299 | throw new NotImplementedException("TriggerTimerEvent was thought to be not used anymore and the registration for the event from scene object part has been commented out due to a memory leak"); | 2487 | throw new NotImplementedException("TriggerTimerEvent was thought to be not used anymore and the registration for the event from scene object part has been commented out due to a memory leak"); |