aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs26
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs12
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs4
3 files changed, 22 insertions, 20 deletions
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs
index 0049384..547e693 100644
--- a/OpenSim/Region/Framework/Scenes/EventManager.cs
+++ b/OpenSim/Region/Framework/Scenes/EventManager.cs
@@ -102,9 +102,10 @@ namespace OpenSim.Region.Framework.Scenes
102 102
103 public event OnPluginConsoleDelegate OnPluginConsole; 103 public event OnPluginConsoleDelegate OnPluginConsole;
104 104
105 public delegate void OnShutdownDelegate(); 105 /// <summary>
106 106 /// Triggered when the entire simulator is shutdown.
107 public event OnShutdownDelegate OnShutdown; 107 /// </summary>
108 public event Action OnShutdown;
108 109
109 public delegate void ObjectDeGrabDelegate(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs); 110 public delegate void ObjectDeGrabDelegate(uint localID, uint originalID, IClientAPI remoteClient, SurfaceTouchEventArgs surfaceArgs);
110 public delegate void ScriptResetDelegate(uint localID, UUID itemID); 111 public delegate void ScriptResetDelegate(uint localID, UUID itemID);
@@ -117,9 +118,14 @@ namespace OpenSim.Region.Framework.Scenes
117 118
118 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; 119 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
119 120
120 public delegate void SceneShuttingDownDelegate(Scene scene); 121 /// <summary>
121 122 /// Triggered when an individual scene is shutdown.
122 public event SceneShuttingDownDelegate OnSceneShuttingDown; 123 /// </summary>
124 /// <remarks>
125 /// This does not automatically mean that the entire simulator is shutting down. Listen to OnShutdown for that
126 /// notification.
127 /// </remarks>
128 public event Action<Scene> OnSceneShuttingDown;
123 129
124 /// <summary> 130 /// <summary>
125 /// Fired when an object is touched/grabbed. 131 /// Fired when an object is touched/grabbed.
@@ -893,10 +899,10 @@ namespace OpenSim.Region.Framework.Scenes
893 899
894 public void TriggerShutdown() 900 public void TriggerShutdown()
895 { 901 {
896 OnShutdownDelegate handlerShutdown = OnShutdown; 902 Action handlerShutdown = OnShutdown;
897 if (handlerShutdown != null) 903 if (handlerShutdown != null)
898 { 904 {
899 foreach (OnShutdownDelegate d in handlerShutdown.GetInvocationList()) 905 foreach (Action d in handlerShutdown.GetInvocationList())
900 { 906 {
901 try 907 try
902 { 908 {
@@ -2236,10 +2242,10 @@ namespace OpenSim.Region.Framework.Scenes
2236 2242
2237 public void TriggerSceneShuttingDown(Scene s) 2243 public void TriggerSceneShuttingDown(Scene s)
2238 { 2244 {
2239 SceneShuttingDownDelegate handler = OnSceneShuttingDown; 2245 Action<Scene> handler = OnSceneShuttingDown;
2240 if (handler != null) 2246 if (handler != null)
2241 { 2247 {
2242 foreach (SceneShuttingDownDelegate d in handler.GetInvocationList()) 2248 foreach (Action<Scene> d in handler.GetInvocationList())
2243 { 2249 {
2244 try 2250 try
2245 { 2251 {
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 0eeb22a..c581b5f 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -5218,18 +5218,16 @@ namespace OpenSim.Region.Framework.Scenes
5218 return offsets.ToArray(); 5218 return offsets.ToArray();
5219 } 5219 }
5220 5220
5221 /// <summary>
5222 /// Regenerate the maptile for this scene.
5223 /// </summary>
5224 /// <param name="sender"></param>
5225 /// <param name="e"></param>
5221 public void RegenerateMaptile(object sender, ElapsedEventArgs e) 5226 public void RegenerateMaptile(object sender, ElapsedEventArgs e)
5222 { 5227 {
5223 IWorldMapModule mapModule = RequestModuleInterface<IWorldMapModule>(); 5228 IWorldMapModule mapModule = RequestModuleInterface<IWorldMapModule>();
5224 if (mapModule != null) 5229 if (mapModule != null)
5225 {
5226 mapModule.GenerateMaptile(); 5230 mapModule.GenerateMaptile();
5227
5228 string error = GridService.RegisterRegion(RegionInfo.ScopeID, new GridRegion(RegionInfo));
5229
5230 if (error != String.Empty)
5231 throw new Exception(error);
5232 }
5233 } 5231 }
5234 5232
5235// public void CleanDroppedAttachments() 5233// public void CleanDroppedAttachments()
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index 12058c8..27833e8 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -174,7 +174,6 @@ namespace OpenSim.Region.Framework.Scenes
174 { 174 {
175 // We're ignoring a collection was modified error because this data gets old and outdated fast. 175 // We're ignoring a collection was modified error because this data gets old and outdated fast.
176 } 176 }
177
178 } 177 }
179 178
180 public delegate void SendCloseChildAgentDelegate(UUID agentID, ulong regionHandle); 179 public delegate void SendCloseChildAgentDelegate(UUID agentID, ulong regionHandle);
@@ -185,13 +184,12 @@ namespace OpenSim.Region.Framework.Scenes
185 /// </summary> 184 /// </summary>
186 protected void SendCloseChildAgentAsync(UUID agentID, ulong regionHandle) 185 protected void SendCloseChildAgentAsync(UUID agentID, ulong regionHandle)
187 { 186 {
188
189 //m_log.Debug("[INTERGRID]: Sending close agent to " + regionHandle);
190 // let's do our best, but there's not much we can do if the neighbour doesn't accept. 187 // let's do our best, but there's not much we can do if the neighbour doesn't accept.
191 188
192 //m_commsProvider.InterRegion.TellRegionToCloseChildConnection(regionHandle, agentID); 189 //m_commsProvider.InterRegion.TellRegionToCloseChildConnection(regionHandle, agentID);
193 uint x = 0, y = 0; 190 uint x = 0, y = 0;
194 Utils.LongToUInts(regionHandle, out x, out y); 191 Utils.LongToUInts(regionHandle, out x, out y);
192
195 GridRegion destination = m_scene.GridService.GetRegionByPosition(m_regionInfo.ScopeID, (int)x, (int)y); 193 GridRegion destination = m_scene.GridService.GetRegionByPosition(m_regionInfo.ScopeID, (int)x, (int)y);
196 m_scene.SimulationService.CloseChildAgent(destination, agentID); 194 m_scene.SimulationService.CloseChildAgent(destination, agentID);
197 } 195 }