aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSim.cs
diff options
context:
space:
mode:
authorMelanie2012-11-23 03:42:04 +0000
committerMelanie2012-11-23 03:42:04 +0000
commit01f06b90dd5d76833e8f2b4709d901e128a1667b (patch)
treebcd34a45717cfe725a99317135ec754dadb1093c /OpenSim/Region/Application/OpenSim.cs
parentFix new command console code to match the output of the original while keeping (diff)
parentMerge branch 'master' into careminster (diff)
downloadopensim-SC-01f06b90dd5d76833e8f2b4709d901e128a1667b.zip
opensim-SC-01f06b90dd5d76833e8f2b4709d901e128a1667b.tar.gz
opensim-SC-01f06b90dd5d76833e8f2b4709d901e128a1667b.tar.bz2
opensim-SC-01f06b90dd5d76833e8f2b4709d901e128a1667b.tar.xz
Merge branch 'careminster' into avination
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 7cafc5d..08e4023 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -664,12 +664,20 @@ namespace OpenSim
664 664
665 if (!SceneManager.TrySetCurrentScene(newRegionName)) 665 if (!SceneManager.TrySetCurrentScene(newRegionName))
666 MainConsole.Instance.Output(String.Format("Couldn't select region {0}", newRegionName)); 666 MainConsole.Instance.Output(String.Format("Couldn't select region {0}", newRegionName));
667 else
668 RefreshPrompt();
667 } 669 }
668 else 670 else
669 { 671 {
670 MainConsole.Instance.Output("Usage: change region <region name>"); 672 MainConsole.Instance.Output("Usage: change region <region name>");
671 } 673 }
674 }
672 675
676 /// <summary>
677 /// Refreshs prompt with the current selection details.
678 /// </summary>
679 private void RefreshPrompt()
680 {
673 string regionName = (SceneManager.CurrentScene == null ? "root" : SceneManager.CurrentScene.RegionInfo.RegionName); 681 string regionName = (SceneManager.CurrentScene == null ? "root" : SceneManager.CurrentScene.RegionInfo.RegionName);
674 MainConsole.Instance.Output(String.Format("Currently selected region is {0}", regionName)); 682 MainConsole.Instance.Output(String.Format("Currently selected region is {0}", regionName));
675 683
@@ -691,6 +699,18 @@ namespace OpenSim
691 m_console.ConsoleScene = SceneManager.CurrentScene; 699 m_console.ConsoleScene = SceneManager.CurrentScene;
692 } 700 }
693 701
702 protected override void HandleRestartRegion(RegionInfo whichRegion)
703 {
704 base.HandleRestartRegion(whichRegion);
705
706 // Where we are restarting multiple scenes at once, a previous call to RefreshPrompt may have set the
707 // m_console.ConsoleScene to null (indicating all scenes).
708 if (m_console.ConsoleScene != null && whichRegion.RegionName == ((Scene)m_console.ConsoleScene).Name)
709 SceneManager.TrySetCurrentScene(whichRegion.RegionName);
710
711 RefreshPrompt();
712 }
713
694 /// <summary> 714 /// <summary>
695 /// Turn on some debugging values for OpenSim. 715 /// Turn on some debugging values for OpenSim.
696 /// </summary> 716 /// </summary>