diff options
author | Melanie | 2010-05-21 21:16:04 +0100 |
---|---|---|
committer | Melanie | 2010-05-21 21:16:04 +0100 |
commit | 297bcb5c3d462128c5c81f35aa7a574e567583d5 (patch) | |
tree | be7744848c474a8241f1d1c0e1f0114cfb824e16 /OpenSim/Region/Framework/Scenes/Scene.cs | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC-297bcb5c3d462128c5c81f35aa7a574e567583d5.zip opensim-SC-297bcb5c3d462128c5c81f35aa7a574e567583d5.tar.gz opensim-SC-297bcb5c3d462128c5c81f35aa7a574e567583d5.tar.bz2 opensim-SC-297bcb5c3d462128c5c81f35aa7a574e567583d5.tar.xz |
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 99 |
1 files changed, 49 insertions, 50 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 377abe3..3e20766 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -58,13 +58,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
58 | 58 | ||
59 | public partial class Scene : SceneBase | 59 | public partial class Scene : SceneBase |
60 | { | 60 | { |
61 | public enum UpdatePrioritizationSchemes { | ||
62 | Time = 0, | ||
63 | Distance = 1, | ||
64 | SimpleAngularDistance = 2, | ||
65 | FrontBack = 3, | ||
66 | } | ||
67 | |||
68 | public delegate void SynchronizeSceneHandler(Scene scene); | 61 | public delegate void SynchronizeSceneHandler(Scene scene); |
69 | public SynchronizeSceneHandler SynchronizeScene = null; | 62 | public SynchronizeSceneHandler SynchronizeScene = null; |
70 | 63 | ||
@@ -402,12 +395,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
402 | private int m_lastUpdate; | 395 | private int m_lastUpdate; |
403 | private bool m_firstHeartbeat = true; | 396 | private bool m_firstHeartbeat = true; |
404 | 397 | ||
405 | private UpdatePrioritizationSchemes m_update_prioritization_scheme = UpdatePrioritizationSchemes.Time; | ||
406 | private bool m_reprioritization_enabled = true; | ||
407 | private double m_reprioritization_interval = 5000.0; | ||
408 | private double m_root_reprioritization_distance = 10.0; | ||
409 | private double m_child_reprioritization_distance = 20.0; | ||
410 | |||
411 | private object m_deleting_scene_object = new object(); | 398 | private object m_deleting_scene_object = new object(); |
412 | 399 | ||
413 | // the minimum time that must elapse before a changed object will be considered for persisted | 400 | // the minimum time that must elapse before a changed object will be considered for persisted |
@@ -415,15 +402,21 @@ namespace OpenSim.Region.Framework.Scenes | |||
415 | // the maximum time that must elapse before a changed object will be considered for persisted | 402 | // the maximum time that must elapse before a changed object will be considered for persisted |
416 | public long m_persistAfter = DEFAULT_MAX_TIME_FOR_PERSISTENCE * 10000000L; | 403 | public long m_persistAfter = DEFAULT_MAX_TIME_FOR_PERSISTENCE * 10000000L; |
417 | 404 | ||
405 | private UpdatePrioritizationSchemes m_priorityScheme = UpdatePrioritizationSchemes.Time; | ||
406 | private bool m_reprioritizationEnabled = true; | ||
407 | private double m_reprioritizationInterval = 5000.0; | ||
408 | private double m_rootReprioritizationDistance = 10.0; | ||
409 | private double m_childReprioritizationDistance = 20.0; | ||
410 | |||
418 | #endregion | 411 | #endregion |
419 | 412 | ||
420 | #region Properties | 413 | #region Properties |
421 | 414 | ||
422 | public UpdatePrioritizationSchemes UpdatePrioritizationScheme { get { return this.m_update_prioritization_scheme; } } | 415 | public UpdatePrioritizationSchemes UpdatePrioritizationScheme { get { return m_priorityScheme; } } |
423 | public bool IsReprioritizationEnabled { get { return m_reprioritization_enabled; } } | 416 | public bool IsReprioritizationEnabled { get { return m_reprioritizationEnabled; } } |
424 | public double ReprioritizationInterval { get { return m_reprioritization_interval; } } | 417 | public double ReprioritizationInterval { get { return m_reprioritizationInterval; } } |
425 | public double RootReprioritizationDistance { get { return m_root_reprioritization_distance; } } | 418 | public double RootReprioritizationDistance { get { return m_rootReprioritizationDistance; } } |
426 | public double ChildReprioritizationDistance { get { return m_child_reprioritization_distance; } } | 419 | public double ChildReprioritizationDistance { get { return m_childReprioritizationDistance; } } |
427 | 420 | ||
428 | public AgentCircuitManager AuthenticateHandler | 421 | public AgentCircuitManager AuthenticateHandler |
429 | { | 422 | { |
@@ -625,6 +618,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
625 | m_asyncSceneObjectDeleter = new AsyncSceneObjectGroupDeleter(this); | 618 | m_asyncSceneObjectDeleter = new AsyncSceneObjectGroupDeleter(this); |
626 | m_asyncSceneObjectDeleter.Enabled = true; | 619 | m_asyncSceneObjectDeleter.Enabled = true; |
627 | 620 | ||
621 | #region Region Settings | ||
622 | |||
628 | // Load region settings | 623 | // Load region settings |
629 | m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); | 624 | m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); |
630 | m_regInfo.WindlightSettings = m_storageManager.DataStore.LoadRegionWindlightSettings(m_regInfo.RegionID); | 625 | m_regInfo.WindlightSettings = m_storageManager.DataStore.LoadRegionWindlightSettings(m_regInfo.RegionID); |
@@ -673,6 +668,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
673 | } | 668 | } |
674 | } | 669 | } |
675 | 670 | ||
671 | #endregion Region Settings | ||
672 | |||
676 | MainConsole.Instance.Commands.AddCommand("region", false, "reload estate", | 673 | MainConsole.Instance.Commands.AddCommand("region", false, "reload estate", |
677 | "reload estate", | 674 | "reload estate", |
678 | "Reload the estate data", HandleReloadEstate); | 675 | "Reload the estate data", HandleReloadEstate); |
@@ -717,6 +714,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
717 | 714 | ||
718 | m_simulatorVersion = simulatorVersion + " (" + Util.GetRuntimeInformation() + ")"; | 715 | m_simulatorVersion = simulatorVersion + " (" + Util.GetRuntimeInformation() + ")"; |
719 | 716 | ||
717 | #region Region Config | ||
718 | |||
720 | try | 719 | try |
721 | { | 720 | { |
722 | // Region config overrides global config | 721 | // Region config overrides global config |
@@ -770,38 +769,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
770 | 769 | ||
771 | m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl); | 770 | m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl); |
772 | 771 | ||
773 | IConfig interest_management_config = m_config.Configs["InterestManagement"]; | ||
774 | if (interest_management_config != null) | ||
775 | { | ||
776 | string update_prioritization_scheme = interest_management_config.GetString("UpdatePrioritizationScheme", "Time").Trim().ToLower(); | ||
777 | switch (update_prioritization_scheme) | ||
778 | { | ||
779 | case "time": | ||
780 | m_update_prioritization_scheme = UpdatePrioritizationSchemes.Time; | ||
781 | break; | ||
782 | case "distance": | ||
783 | m_update_prioritization_scheme = UpdatePrioritizationSchemes.Distance; | ||
784 | break; | ||
785 | case "simpleangulardistance": | ||
786 | m_update_prioritization_scheme = UpdatePrioritizationSchemes.SimpleAngularDistance; | ||
787 | break; | ||
788 | case "frontback": | ||
789 | m_update_prioritization_scheme = UpdatePrioritizationSchemes.FrontBack; | ||
790 | break; | ||
791 | default: | ||
792 | m_log.Warn("[SCENE]: UpdatePrioritizationScheme was not recognized, setting to default settomg of Time"); | ||
793 | m_update_prioritization_scheme = UpdatePrioritizationSchemes.Time; | ||
794 | break; | ||
795 | } | ||
796 | |||
797 | m_reprioritization_enabled = interest_management_config.GetBoolean("ReprioritizationEnabled", true); | ||
798 | m_reprioritization_interval = interest_management_config.GetDouble("ReprioritizationInterval", 5000.0); | ||
799 | m_root_reprioritization_distance = interest_management_config.GetDouble("RootReprioritizationDistance", 10.0); | ||
800 | m_child_reprioritization_distance = interest_management_config.GetDouble("ChildReprioritizationDistance", 20.0); | ||
801 | } | ||
802 | |||
803 | m_log.Info("[SCENE]: Using the " + m_update_prioritization_scheme + " prioritization scheme"); | ||
804 | |||
805 | #region BinaryStats | 772 | #region BinaryStats |
806 | 773 | ||
807 | try | 774 | try |
@@ -838,6 +805,38 @@ namespace OpenSim.Region.Framework.Scenes | |||
838 | { | 805 | { |
839 | m_log.Warn("[SCENE]: Failed to load StartupConfig"); | 806 | m_log.Warn("[SCENE]: Failed to load StartupConfig"); |
840 | } | 807 | } |
808 | |||
809 | #endregion Region Config | ||
810 | |||
811 | #region Interest Management | ||
812 | |||
813 | if (m_config != null) | ||
814 | { | ||
815 | IConfig interestConfig = m_config.Configs["InterestManagement"]; | ||
816 | if (interestConfig != null) | ||
817 | { | ||
818 | string update_prioritization_scheme = interestConfig.GetString("UpdatePrioritizationScheme", "Time").Trim().ToLower(); | ||
819 | |||
820 | try | ||
821 | { | ||
822 | m_priorityScheme = (UpdatePrioritizationSchemes)Enum.Parse(typeof(UpdatePrioritizationSchemes), update_prioritization_scheme, true); | ||
823 | } | ||
824 | catch (Exception) | ||
825 | { | ||
826 | m_log.Warn("[PRIORITIZER]: UpdatePrioritizationScheme was not recognized, setting to default prioritizer Time"); | ||
827 | m_priorityScheme = UpdatePrioritizationSchemes.Time; | ||
828 | } | ||
829 | |||
830 | m_reprioritizationEnabled = interestConfig.GetBoolean("ReprioritizationEnabled", true); | ||
831 | m_reprioritizationInterval = interestConfig.GetDouble("ReprioritizationInterval", 5000.0); | ||
832 | m_rootReprioritizationDistance = interestConfig.GetDouble("RootReprioritizationDistance", 10.0); | ||
833 | m_childReprioritizationDistance = interestConfig.GetDouble("ChildReprioritizationDistance", 20.0); | ||
834 | } | ||
835 | } | ||
836 | |||
837 | m_log.Info("[SCENE]: Using the " + m_priorityScheme + " prioritization scheme"); | ||
838 | |||
839 | #endregion Interest Management | ||
841 | } | 840 | } |
842 | 841 | ||
843 | /// <summary> | 842 | /// <summary> |