aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorMelanie Thielker2010-05-04 18:10:13 +0200
committerMelanie2010-05-04 15:52:36 +0100
commit6eea0a39316483d2e1d02374e6caf2397ed9e3b6 (patch)
tree30f16b430004efc8a67447d4f9a5184fa53cd854 /OpenSim/Region/Framework/Scenes
parentAllow regions to get the list of the other regions in the estate (diff)
downloadopensim-SC_OLD-6eea0a39316483d2e1d02374e6caf2397ed9e3b6.zip
opensim-SC_OLD-6eea0a39316483d2e1d02374e6caf2397ed9e3b6.tar.gz
opensim-SC_OLD-6eea0a39316483d2e1d02374e6caf2397ed9e3b6.tar.bz2
opensim-SC_OLD-6eea0a39316483d2e1d02374e6caf2397ed9e3b6.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 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs46
1 files changed, 46 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 3e4694a..da18629 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -5075,5 +5075,51 @@ namespace OpenSim.Region.Framework.Scenes
5075 { 5075 {
5076 return new Vector3(x, y, GetGroundHeight(x, y)); 5076 return new Vector3(x, y, GetGroundHeight(x, y));
5077 } 5077 }
5078
5079 public List<UUID> GetEstateRegions(int estateID)
5080 {
5081 if (m_storageManager.EstateDataStore == null)
5082 return new List<UUID>();
5083
5084 return m_storageManager.EstateDataStore.GetRegions(estateID);
5085 }
5086
5087 public void ReloadEstateData()
5088 {
5089 m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID, false);
5090
5091 TriggerEstateSunUpdate();
5092 }
5093
5094 public void TriggerEstateSunUpdate()
5095 {
5096 float sun;
5097 if (RegionInfo.RegionSettings.UseEstateSun)
5098 {
5099 sun = (float)RegionInfo.EstateSettings.SunPosition;
5100 if (RegionInfo.EstateSettings.UseGlobalTime)
5101 {
5102 sun = EventManager.GetCurrentTimeAsSunLindenHour() - 6.0f;
5103 }
5104
5105 //
5106 EventManager.TriggerEstateToolsSunUpdate(
5107 RegionInfo.RegionHandle,
5108 RegionInfo.EstateSettings.FixedSun,
5109 RegionInfo.RegionSettings.UseEstateSun,
5110 sun);
5111 }
5112 else
5113 {
5114 // Use the Sun Position from the Region Settings
5115 sun = (float)RegionInfo.RegionSettings.SunPosition - 6.0f;
5116
5117 EventManager.TriggerEstateToolsSunUpdate(
5118 RegionInfo.RegionHandle,
5119 RegionInfo.RegionSettings.FixedSun,
5120 RegionInfo.RegionSettings.UseEstateSun,
5121 sun);
5122 }
5123 }
5078 } 5124 }
5079} 5125}