aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs53
1 files changed, 24 insertions, 29 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index a01b851..9e59d50 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -596,7 +596,7 @@ namespace OpenSim.Region.Framework.Scenes
596 596
597 #endregion Region Settings 597 #endregion Region Settings
598 598
599 MainConsole.Instance.Commands.AddCommand("region", false, "reload estate", 599 MainConsole.Instance.Commands.AddCommand("Estates", false, "reload estate",
600 "reload estate", 600 "reload estate",
601 "Reload the estate data", HandleReloadEstate); 601 "Reload the estate data", HandleReloadEstate);
602 602
@@ -628,10 +628,10 @@ namespace OpenSim.Region.Framework.Scenes
628 628
629 #region Region Config 629 #region Region Config
630 630
631 try 631 // Region config overrides global config
632 //
633 if (m_config.Configs["Startup"] != null)
632 { 634 {
633 // Region config overrides global config
634 //
635 IConfig startupConfig = m_config.Configs["Startup"]; 635 IConfig startupConfig = m_config.Configs["Startup"];
636 636
637 m_defaultDrawDistance = startupConfig.GetFloat("DefaultDrawDistance",m_defaultDrawDistance); 637 m_defaultDrawDistance = startupConfig.GetFloat("DefaultDrawDistance",m_defaultDrawDistance);
@@ -721,46 +721,39 @@ namespace OpenSim.Region.Framework.Scenes
721 m_update_terrain = startupConfig.GetInt( "UpdateTerrainEveryNFrames", m_update_terrain); 721 m_update_terrain = startupConfig.GetInt( "UpdateTerrainEveryNFrames", m_update_terrain);
722 m_update_temp_cleaning = startupConfig.GetInt( "UpdateTempCleaningEveryNFrames", m_update_temp_cleaning); 722 m_update_temp_cleaning = startupConfig.GetInt( "UpdateTempCleaningEveryNFrames", m_update_temp_cleaning);
723 } 723 }
724 catch
725 {
726 m_log.Warn("[SCENE]: Failed to load StartupConfig");
727 }
728 724
729 #endregion Region Config 725 #endregion Region Config
730 726
731 #region Interest Management 727 #region Interest Management
732 728
733 if (m_config != null) 729 IConfig interestConfig = m_config.Configs["InterestManagement"];
730 if (interestConfig != null)
734 { 731 {
735 IConfig interestConfig = m_config.Configs["InterestManagement"]; 732 string update_prioritization_scheme = interestConfig.GetString("UpdatePrioritizationScheme", "Time").Trim().ToLower();
736 if (interestConfig != null)
737 {
738 string update_prioritization_scheme = interestConfig.GetString("UpdatePrioritizationScheme", "Time").Trim().ToLower();
739 733
740 try 734 try
741 { 735 {
742 m_priorityScheme = (UpdatePrioritizationSchemes)Enum.Parse(typeof(UpdatePrioritizationSchemes), update_prioritization_scheme, true); 736 m_priorityScheme = (UpdatePrioritizationSchemes)Enum.Parse(typeof(UpdatePrioritizationSchemes), update_prioritization_scheme, true);
743 }
744 catch (Exception)
745 {
746 m_log.Warn("[PRIORITIZER]: UpdatePrioritizationScheme was not recognized, setting to default prioritizer Time");
747 m_priorityScheme = UpdatePrioritizationSchemes.Time;
748 }
749
750 m_reprioritizationEnabled = interestConfig.GetBoolean("ReprioritizationEnabled", true);
751 m_reprioritizationInterval = interestConfig.GetDouble("ReprioritizationInterval", 5000.0);
752 m_rootReprioritizationDistance = interestConfig.GetDouble("RootReprioritizationDistance", 10.0);
753 m_childReprioritizationDistance = interestConfig.GetDouble("ChildReprioritizationDistance", 20.0);
754 } 737 }
738 catch (Exception)
739 {
740 m_log.Warn("[PRIORITIZER]: UpdatePrioritizationScheme was not recognized, setting to default prioritizer Time");
741 m_priorityScheme = UpdatePrioritizationSchemes.Time;
742 }
743
744 m_reprioritizationEnabled = interestConfig.GetBoolean("ReprioritizationEnabled", true);
745 m_reprioritizationInterval = interestConfig.GetDouble("ReprioritizationInterval", 5000.0);
746 m_rootReprioritizationDistance = interestConfig.GetDouble("RootReprioritizationDistance", 10.0);
747 m_childReprioritizationDistance = interestConfig.GetDouble("ChildReprioritizationDistance", 20.0);
755 } 748 }
756 749
757 m_log.InfoFormat("[SCENE]: Using the {0} prioritization scheme", m_priorityScheme); 750 m_log.DebugFormat("[SCENE]: Using the {0} prioritization scheme", m_priorityScheme);
758 751
759 #endregion Interest Management 752 #endregion Interest Management
760 753
761 StatsReporter = new SimStatsReporter(this); 754 StatsReporter = new SimStatsReporter(this);
762 StatsReporter.OnSendStatsResult += SendSimStatsPackets; 755 StatsReporter.OnSendStatsResult += SendSimStatsPackets;
763 StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; 756 StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats;
764 } 757 }
765 758
766 /// <summary> 759 /// <summary>
@@ -1076,6 +1069,8 @@ namespace OpenSim.Region.Framework.Scenes
1076 { 1069 {
1077 m_log.InfoFormat("[SCENE]: Closing down the single simulator: {0}", RegionInfo.RegionName); 1070 m_log.InfoFormat("[SCENE]: Closing down the single simulator: {0}", RegionInfo.RegionName);
1078 1071
1072 StatsReporter.Close();
1073
1079 m_restartTimer.Stop(); 1074 m_restartTimer.Stop();
1080 m_restartTimer.Close(); 1075 m_restartTimer.Close();
1081 1076