aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSimBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Application/OpenSimBase.cs')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs36
1 files changed, 19 insertions, 17 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 3271555..825c4c4 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -285,7 +285,7 @@ namespace OpenSim
285 285
286 private void HandleCommanderCommand(string module, string[] cmd) 286 private void HandleCommanderCommand(string module, string[] cmd)
287 { 287 {
288 m_sceneManager.SendCommandToPluginModules(cmd); 288 SceneManager.SendCommandToPluginModules(cmd);
289 } 289 }
290 290
291 private void HandleCommanderHelp(string module, string[] cmd) 291 private void HandleCommanderHelp(string module, string[] cmd)
@@ -303,7 +303,10 @@ namespace OpenSim
303 // Called from base.StartUp() 303 // Called from base.StartUp()
304 304
305 m_httpServerPort = m_networkServersInfo.HttpListenerPort; 305 m_httpServerPort = m_networkServersInfo.HttpListenerPort;
306 m_sceneManager.OnRestartSim += handleRestartRegion; 306 SceneManager.OnRestartSim += handleRestartRegion;
307
308 // Only start the memory watchdog once all regions are ready
309 SceneManager.OnRegionsReadyStatusChange += sm => MemoryWatchdog.Enabled = sm.AllRegionsReady;
307 } 310 }
308 311
309 /// <summary> 312 /// <summary>
@@ -412,7 +415,7 @@ namespace OpenSim
412 // scripting engines. 415 // scripting engines.
413 scene.CreateScriptInstances(); 416 scene.CreateScriptInstances();
414 417
415 m_sceneManager.Add(scene); 418 SceneManager.Add(scene);
416 419
417 if (m_autoCreateClientStack) 420 if (m_autoCreateClientStack)
418 { 421 {
@@ -432,7 +435,6 @@ namespace OpenSim
432 mscene = scene; 435 mscene = scene;
433 436
434 scene.Start(); 437 scene.Start();
435
436 scene.StartScripts(); 438 scene.StartScripts();
437 439
438 return clientServer; 440 return clientServer;
@@ -561,14 +563,14 @@ namespace OpenSim
561 { 563 {
562 // only need to check this if we are not at the 564 // only need to check this if we are not at the
563 // root level 565 // root level
564 if ((m_sceneManager.CurrentScene != null) && 566 if ((SceneManager.CurrentScene != null) &&
565 (m_sceneManager.CurrentScene.RegionInfo.RegionID == scene.RegionInfo.RegionID)) 567 (SceneManager.CurrentScene.RegionInfo.RegionID == scene.RegionInfo.RegionID))
566 { 568 {
567 m_sceneManager.TrySetCurrentScene(".."); 569 SceneManager.TrySetCurrentScene("..");
568 } 570 }
569 571
570 scene.DeleteAllSceneObjects(); 572 scene.DeleteAllSceneObjects();
571 m_sceneManager.CloseScene(scene); 573 SceneManager.CloseScene(scene);
572 ShutdownClientServer(scene.RegionInfo); 574 ShutdownClientServer(scene.RegionInfo);
573 575
574 if (!cleanup) 576 if (!cleanup)
@@ -610,7 +612,7 @@ namespace OpenSim
610 public void RemoveRegion(string name, bool cleanUp) 612 public void RemoveRegion(string name, bool cleanUp)
611 { 613 {
612 Scene target; 614 Scene target;
613 if (m_sceneManager.TryGetScene(name, out target)) 615 if (SceneManager.TryGetScene(name, out target))
614 RemoveRegion(target, cleanUp); 616 RemoveRegion(target, cleanUp);
615 } 617 }
616 618
@@ -623,13 +625,13 @@ namespace OpenSim
623 { 625 {
624 // only need to check this if we are not at the 626 // only need to check this if we are not at the
625 // root level 627 // root level
626 if ((m_sceneManager.CurrentScene != null) && 628 if ((SceneManager.CurrentScene != null) &&
627 (m_sceneManager.CurrentScene.RegionInfo.RegionID == scene.RegionInfo.RegionID)) 629 (SceneManager.CurrentScene.RegionInfo.RegionID == scene.RegionInfo.RegionID))
628 { 630 {
629 m_sceneManager.TrySetCurrentScene(".."); 631 SceneManager.TrySetCurrentScene("..");
630 } 632 }
631 633
632 m_sceneManager.CloseScene(scene); 634 SceneManager.CloseScene(scene);
633 ShutdownClientServer(scene.RegionInfo); 635 ShutdownClientServer(scene.RegionInfo);
634 } 636 }
635 637
@@ -641,7 +643,7 @@ namespace OpenSim
641 public void CloseRegion(string name) 643 public void CloseRegion(string name)
642 { 644 {
643 Scene target; 645 Scene target;
644 if (m_sceneManager.TryGetScene(name, out target)) 646 if (SceneManager.TryGetScene(name, out target))
645 CloseRegion(target); 647 CloseRegion(target);
646 } 648 }
647 649
@@ -897,7 +899,7 @@ namespace OpenSim
897 899
898 try 900 try
899 { 901 {
900 m_sceneManager.Close(); 902 SceneManager.Close();
901 } 903 }
902 catch (Exception e) 904 catch (Exception e)
903 { 905 {
@@ -922,7 +924,7 @@ namespace OpenSim
922 /// <param name="usernum">The first out parameter describing the number of all the avatars in the Region server</param> 924 /// <param name="usernum">The first out parameter describing the number of all the avatars in the Region server</param>
923 public void GetAvatarNumber(out int usernum) 925 public void GetAvatarNumber(out int usernum)
924 { 926 {
925 usernum = m_sceneManager.GetCurrentSceneAvatars().Count; 927 usernum = SceneManager.GetCurrentSceneAvatars().Count;
926 } 928 }
927 929
928 /// <summary> 930 /// <summary>
@@ -931,7 +933,7 @@ namespace OpenSim
931 /// <param name="regionnum">The first out parameter describing the number of regions</param> 933 /// <param name="regionnum">The first out parameter describing the number of regions</param>
932 public void GetRegionNumber(out int regionnum) 934 public void GetRegionNumber(out int regionnum)
933 { 935 {
934 regionnum = m_sceneManager.Scenes.Count; 936 regionnum = SceneManager.Scenes.Count;
935 } 937 }
936 938
937 /// <summary> 939 /// <summary>