diff options
author | Melanie Thielker | 2010-05-04 18:10:13 +0200 |
---|---|---|
committer | Melanie Thielker | 2010-05-04 18:10:13 +0200 |
commit | 4f93d30790c8392c6f91cb1818d1c16f89169ab7 (patch) | |
tree | c70b559f2daee1fb5eebfb2059e8ac2a81c068bb /OpenSim/Region/Framework | |
parent | Allow regions to get the list of the other regions in the estate (diff) | |
download | opensim-SC-4f93d30790c8392c6f91cb1818d1c16f89169ab7.zip opensim-SC-4f93d30790c8392c6f91cb1818d1c16f89169ab7.tar.gz opensim-SC-4f93d30790c8392c6f91cb1818d1c16f89169ab7.tar.bz2 opensim-SC-4f93d30790c8392c6f91cb1818d1c16f89169ab7.tar.xz |
Allow reloading of estate settings into a running region. Move sun update
helper into Scene, since that is less evil than exposing m_storageManager
to the public.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 3e78a08..f17e464 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -5109,5 +5109,51 @@ namespace OpenSim.Region.Framework.Scenes | |||
5109 | { | 5109 | { |
5110 | return new Vector3(x, y, GetGroundHeight(x, y)); | 5110 | return new Vector3(x, y, GetGroundHeight(x, y)); |
5111 | } | 5111 | } |
5112 | |||
5113 | public List<UUID> GetEstateRegions(int estateID) | ||
5114 | { | ||
5115 | if (m_storageManager.EstateDataStore == null) | ||
5116 | return new List<UUID>(); | ||
5117 | |||
5118 | return m_storageManager.EstateDataStore.GetRegions(estateID); | ||
5119 | } | ||
5120 | |||
5121 | public void ReloadEstateData() | ||
5122 | { | ||
5123 | m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID, false); | ||
5124 | |||
5125 | TriggerEstateSunUpdate(); | ||
5126 | } | ||
5127 | |||
5128 | public void TriggerEstateSunUpdate() | ||
5129 | { | ||
5130 | float sun; | ||
5131 | if (RegionInfo.RegionSettings.UseEstateSun) | ||
5132 | { | ||
5133 | sun = (float)RegionInfo.EstateSettings.SunPosition; | ||
5134 | if (RegionInfo.EstateSettings.UseGlobalTime) | ||
5135 | { | ||
5136 | sun = EventManager.GetCurrentTimeAsSunLindenHour() - 6.0f; | ||
5137 | } | ||
5138 | |||
5139 | // | ||
5140 | EventManager.TriggerEstateToolsSunUpdate( | ||
5141 | RegionInfo.RegionHandle, | ||
5142 | RegionInfo.EstateSettings.FixedSun, | ||
5143 | RegionInfo.RegionSettings.UseEstateSun, | ||
5144 | sun); | ||
5145 | } | ||
5146 | else | ||
5147 | { | ||
5148 | // Use the Sun Position from the Region Settings | ||
5149 | sun = (float)RegionInfo.RegionSettings.SunPosition - 6.0f; | ||
5150 | |||
5151 | EventManager.TriggerEstateToolsSunUpdate( | ||
5152 | RegionInfo.RegionHandle, | ||
5153 | RegionInfo.RegionSettings.FixedSun, | ||
5154 | RegionInfo.RegionSettings.UseEstateSun, | ||
5155 | sun); | ||
5156 | } | ||
5157 | } | ||
5112 | } | 5158 | } |
5113 | } | 5159 | } |