aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
authorTeravus Ovares2007-11-29 02:07:19 +0000
committerTeravus Ovares2007-11-29 02:07:19 +0000
commit81ba94fde8871df86e304a3dad7846059fd32045 (patch)
treee69bf4f58fe2a18576eac64f677de196d0f31278 /OpenSim/Region/Environment/Scenes/Scene.cs
parentset svn:eol-style (diff)
downloadopensim-SC_OLD-81ba94fde8871df86e304a3dad7846059fd32045.zip
opensim-SC_OLD-81ba94fde8871df86e304a3dad7846059fd32045.tar.gz
opensim-SC_OLD-81ba94fde8871df86e304a3dad7846059fd32045.tar.bz2
opensim-SC_OLD-81ba94fde8871df86e304a3dad7846059fd32045.tar.xz
* Fixed about 7 issues with restarting sims and resolved interRegion comms issues. This includes the issue that MW described this morning.
There's a lot of little nit picky changes that make a world of difference.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs60
1 files changed, 34 insertions, 26 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 68af360..3309431 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -277,15 +277,41 @@ namespace OpenSim.Region.Environment.Scenes
277 // This fails to get the desired effect and needs further work. 277 // This fails to get the desired effect and needs further work.
278 if (RegionInfo.RegionHandle != otherRegion.RegionHandle) 278 if (RegionInfo.RegionHandle != otherRegion.RegionHandle)
279 { 279 {
280 if (!(m_regionRestartNotifyList.Contains(otherRegion))) 280 if (Math.Abs(otherRegion.RegionLocX - RegionInfo.RegionLocX) <= 1 || Math.Abs(otherRegion.RegionLocY - RegionInfo.RegionLocY) <= 1)
281 { 281 {
282 m_regionRestartNotifyList.Add(otherRegion); 282 try
283 283 {
284 m_restartWaitTimer = new Timer(20000); 284
285 m_restartWaitTimer.AutoReset = false; 285 ForEachScenePresence(delegate(ScenePresence agent)
286 m_restartWaitTimer.Elapsed += new ElapsedEventHandler(restart_Notify_Wait_Elapsed); 286 {
287 m_restartWaitTimer.Start(); 287 if (!(agent.IsChildAgent))
288 {
289 //agent.ControllingClient.new
290 //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo());
291 InformClientOfNeighbor(agent, otherRegion);
292 }
293 }
294
295 );
296 }
297 catch (System.NullReferenceException)
298 {
299 // This means that we're not booted up completely yet.
300 }
301 }
302 else
303 {
304 MainLog.Instance.Verbose("INTERGRID", "Got notice about Region at X:" + otherRegion.RegionLocX.ToString() + " Y:" + otherRegion.RegionLocY.ToString() + " but it was too far away to send to the client");
288 } 305 }
306 //if (!(m_regionRestartNotifyList.Contains(otherRegion)))
307 //{
308 //m_regionRestartNotifyList.Add(otherRegion);
309
310 //m_restartWaitTimer = new Timer(20000);
311 //m_restartWaitTimer.AutoReset = false;
312 // m_restartWaitTimer.Elapsed += new ElapsedEventHandler(restart_Notify_Wait_Elapsed);
313 //m_restartWaitTimer.Start();
314 //}
289 } 315 }
290 return true; 316 return true;
291 } 317 }
@@ -342,25 +368,7 @@ namespace OpenSim.Region.Environment.Scenes
342 m_restartWaitTimer.Stop(); 368 m_restartWaitTimer.Stop();
343 foreach (RegionInfo region in m_regionRestartNotifyList) 369 foreach (RegionInfo region in m_regionRestartNotifyList)
344 { 370 {
345 try 371
346 {
347
348 ForEachScenePresence(delegate(ScenePresence agent)
349 {
350 if (!(agent.IsChildAgent))
351 {
352 //agent.ControllingClient.new
353 //this.CommsManager.InterRegion.InformRegionOfChildAgent(otherRegion.RegionHandle, agent.ControllingClient.RequestClientInfo());
354 InformClientOfNeighbor(agent, region);
355 }
356 }
357
358 );
359 }
360 catch (System.NullReferenceException)
361 {
362 // This means that we're not booted up completely yet.
363 }
364 } 372 }
365 // Reset list to nothing. 373 // Reset list to nothing.
366 m_regionRestartNotifyList = new List<RegionInfo>(); 374 m_regionRestartNotifyList = new List<RegionInfo>();