diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-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 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 | } |