aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authordahlia2014-02-19 17:52:38 -0800
committerdahlia2014-02-19 17:52:38 -0800
commit269a6410a04e1c8b7140bbbcfe4308d639e78773 (patch)
tree72442a7046243a410e08ebd1c97c45b0cf03c591
parentvarregion: make scene default draw distance to be the maximum size of the (diff)
downloadopensim-SC_OLD-269a6410a04e1c8b7140bbbcfe4308d639e78773.zip
opensim-SC_OLD-269a6410a04e1c8b7140bbbcfe4308d639e78773.tar.gz
opensim-SC_OLD-269a6410a04e1c8b7140bbbcfe4308d639e78773.tar.bz2
opensim-SC_OLD-269a6410a04e1c8b7140bbbcfe4308d639e78773.tar.xz
add EventManager event OnCrossAgentToNewRegion
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs24
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs1
2 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 37b5776..1981a25 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -430,6 +430,9 @@ namespace OpenSim.Region.Framework.Scenes
430 public delegate void IncomingInstantMessage(GridInstantMessage message); 430 public delegate void IncomingInstantMessage(GridInstantMessage message);
431 public event IncomingInstantMessage OnIncomingInstantMessage; 431 public event IncomingInstantMessage OnIncomingInstantMessage;
432 432
433 public delegate void CrossAgentToNewRegion(ScenePresence sp, bool isFlying);
434 public event CrossAgentToNewRegion OnCrossAgentToNewRegion;
435
433 public event IncomingInstantMessage OnUnhandledInstantMessage; 436 public event IncomingInstantMessage OnUnhandledInstantMessage;
434 437
435 public delegate void ClientClosed(UUID clientID, Scene scene); 438 public delegate void ClientClosed(UUID clientID, Scene scene);
@@ -1960,6 +1963,27 @@ namespace OpenSim.Region.Framework.Scenes
1960 } 1963 }
1961 } 1964 }
1962 1965
1966 public void TriggerCrossAgentToNewRegion(ScenePresence agent, bool isFlying)
1967 {
1968 CrossAgentToNewRegion handlerCrossAgentToNewRegion = OnCrossAgentToNewRegion;
1969 if (handlerCrossAgentToNewRegion != null)
1970 {
1971 foreach (CrossAgentToNewRegion d in handlerCrossAgentToNewRegion.GetInvocationList())
1972 {
1973 try
1974 {
1975 d(agent, isFlying);
1976 }
1977 catch (Exception e)
1978 {
1979 m_log.ErrorFormat(
1980 "[EVENT MANAGER]: Delegate for TriggerCrossAgentToNewRegion failed - continuing. {0} {1}",
1981 e.Message, e.StackTrace);
1982 }
1983 }
1984 }
1985 }
1986
1963 public void TriggerIncomingInstantMessage(GridInstantMessage message) 1987 public void TriggerIncomingInstantMessage(GridInstantMessage message)
1964 { 1988 {
1965 IncomingInstantMessage handlerIncomingInstantMessage = OnIncomingInstantMessage; 1989 IncomingInstantMessage handlerIncomingInstantMessage = OnIncomingInstantMessage;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 676c000..06ddcbd 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4358,6 +4358,7 @@ namespace OpenSim.Region.Framework.Scenes
4358 { 4358 {
4359 if (EntityTransferModule != null) 4359 if (EntityTransferModule != null)
4360 { 4360 {
4361 EventManager.TriggerCrossAgentToNewRegion(agent, isFlying);
4361 return EntityTransferModule.Cross(agent, isFlying); 4362 return EntityTransferModule.Cross(agent, isFlying);
4362 } 4363 }
4363 else 4364 else