diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 54 |
1 files changed, 52 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 3db7c7d..a5f0bff 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -177,6 +177,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
177 | protected ICapabilitiesModule m_capsModule; | 177 | protected ICapabilitiesModule m_capsModule; |
178 | protected IGroupsModule m_groupsModule; | 178 | protected IGroupsModule m_groupsModule; |
179 | 179 | ||
180 | private Dictionary<string, string> m_extraSettings; | ||
181 | |||
180 | /// <summary> | 182 | /// <summary> |
181 | /// Current scene frame number | 183 | /// Current scene frame number |
182 | /// </summary> | 184 | /// </summary> |
@@ -658,6 +660,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
658 | // FIXME: It shouldn't be up to the database plugins to create this data - we should do it when a new | 660 | // FIXME: It shouldn't be up to the database plugins to create this data - we should do it when a new |
659 | // region is set up and avoid these gyrations. | 661 | // region is set up and avoid these gyrations. |
660 | RegionSettings rs = simDataService.LoadRegionSettings(RegionInfo.RegionID); | 662 | RegionSettings rs = simDataService.LoadRegionSettings(RegionInfo.RegionID); |
663 | m_extraSettings = simDataService.GetExtra(RegionInfo.RegionID); | ||
664 | |||
661 | bool updatedTerrainTextures = false; | 665 | bool updatedTerrainTextures = false; |
662 | if (rs.TerrainTexture1 == UUID.Zero) | 666 | if (rs.TerrainTexture1 == UUID.Zero) |
663 | { | 667 | { |
@@ -842,7 +846,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
842 | m_update_presences = startupConfig.GetInt( "UpdateAgentsEveryNFrames", m_update_presences); | 846 | m_update_presences = startupConfig.GetInt( "UpdateAgentsEveryNFrames", m_update_presences); |
843 | m_update_terrain = startupConfig.GetInt( "UpdateTerrainEveryNFrames", m_update_terrain); | 847 | m_update_terrain = startupConfig.GetInt( "UpdateTerrainEveryNFrames", m_update_terrain); |
844 | m_update_temp_cleaning = startupConfig.GetInt( "UpdateTempCleaningEveryNFrames", m_update_temp_cleaning); | 848 | m_update_temp_cleaning = startupConfig.GetInt( "UpdateTempCleaningEveryNFrames", m_update_temp_cleaning); |
845 | SendPeriodicAppearanceUpdates = startupConfig.GetBoolean("SendPeriodicAppearanceUpdates", SendPeriodicAppearanceUpdates); | ||
846 | } | 849 | } |
847 | } | 850 | } |
848 | catch (Exception e) | 851 | catch (Exception e) |
@@ -850,6 +853,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
850 | m_log.Error("[SCENE]: Failed to load StartupConfig: " + e.ToString()); | 853 | m_log.Error("[SCENE]: Failed to load StartupConfig: " + e.ToString()); |
851 | } | 854 | } |
852 | 855 | ||
856 | // FIXME: Ultimately this should be in a module. | ||
857 | IConfig appearanceConfig = m_config.Configs["Appearance"]; | ||
858 | if (appearanceConfig != null) | ||
859 | { | ||
860 | SendPeriodicAppearanceUpdates | ||
861 | = appearanceConfig.GetBoolean("ResendAppearanceUpdates", SendPeriodicAppearanceUpdates); | ||
862 | } | ||
863 | |||
853 | #endregion Region Config | 864 | #endregion Region Config |
854 | 865 | ||
855 | #region Interest Management | 866 | #region Interest Management |
@@ -2748,7 +2759,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2748 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); | 2759 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); |
2749 | 2760 | ||
2750 | if (AttachmentsModule != null) | 2761 | if (AttachmentsModule != null) |
2751 | AttachmentsModule.AttachObject(sp, grp, 0, false, false); | 2762 | AttachmentsModule.AttachObject(sp, grp, 0, false, false, false); |
2752 | } | 2763 | } |
2753 | else | 2764 | else |
2754 | { | 2765 | { |
@@ -5843,5 +5854,44 @@ Environment.Exit(1); | |||
5843 | 5854 | ||
5844 | callback(asset); | 5855 | callback(asset); |
5845 | } | 5856 | } |
5857 | |||
5858 | public string GetExtraSetting(string name) | ||
5859 | { | ||
5860 | string val; | ||
5861 | |||
5862 | if (!m_extraSettings.TryGetValue(name, out val)) | ||
5863 | return String.Empty; | ||
5864 | |||
5865 | return val; | ||
5866 | } | ||
5867 | |||
5868 | public void StoreExtraSetting(string name, string val) | ||
5869 | { | ||
5870 | string oldVal; | ||
5871 | |||
5872 | if (m_extraSettings.TryGetValue(name, out oldVal)) | ||
5873 | { | ||
5874 | if (oldVal == val) | ||
5875 | return; | ||
5876 | } | ||
5877 | |||
5878 | m_extraSettings[name] = val; | ||
5879 | |||
5880 | m_SimulationDataService.SaveExtra(RegionInfo.RegionID, name, val); | ||
5881 | |||
5882 | m_eventManager.TriggerExtraSettingChanged(this, name, val); | ||
5883 | } | ||
5884 | |||
5885 | public void RemoveExtraSetting(string name) | ||
5886 | { | ||
5887 | if (!m_extraSettings.ContainsKey(name)) | ||
5888 | return; | ||
5889 | |||
5890 | m_extraSettings.Remove(name); | ||
5891 | |||
5892 | m_SimulationDataService.RemoveExtra(RegionInfo.RegionID, name); | ||
5893 | |||
5894 | m_eventManager.TriggerExtraSettingChanged(this, name, String.Empty); | ||
5895 | } | ||
5846 | } | 5896 | } |
5847 | } | 5897 | } |