aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs40
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs46
2 files changed, 49 insertions, 37 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
index 91d40ab..77068b0 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
@@ -212,7 +212,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
212 m_scene.RegionInfo.RegionSettings.FixedSun = UseFixedSun; 212 m_scene.RegionInfo.RegionSettings.FixedSun = UseFixedSun;
213 m_scene.RegionInfo.RegionSettings.SunPosition = SunHour; 213 m_scene.RegionInfo.RegionSettings.SunPosition = SunHour;
214 214
215 TriggerEstateToolsSunUpdate(); 215 m_scene.TriggerEstateSunUpdate();
216 216
217 //m_log.Debug("[ESTATE]: UFS: " + UseFixedSun.ToString()); 217 //m_log.Debug("[ESTATE]: UFS: " + UseFixedSun.ToString());
218 //m_log.Debug("[ESTATE]: SunHour: " + SunHour.ToString()); 218 //m_log.Debug("[ESTATE]: SunHour: " + SunHour.ToString());
@@ -861,7 +861,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
861 861
862 m_scene.RegionInfo.EstateSettings.Save(); 862 m_scene.RegionInfo.EstateSettings.Save();
863 863
864 TriggerEstateToolsSunUpdate(); 864 m_scene.TriggerEstateSunUpdate();
865 865
866 sendDetailedEstateData(remoteClient, invoice); 866 sendDetailedEstateData(remoteClient, invoice);
867 } 867 }
@@ -983,7 +983,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
983 { 983 {
984 // Sets up the sun module based no the saved Estate and Region Settings 984 // Sets up the sun module based no the saved Estate and Region Settings
985 // DO NOT REMOVE or the sun will stop working 985 // DO NOT REMOVE or the sun will stop working
986 TriggerEstateToolsSunUpdate(); 986 m_scene.TriggerEstateSunUpdate();
987 } 987 }
988 988
989 public void Close() 989 public void Close()
@@ -1004,40 +1004,6 @@ namespace OpenSim.Region.CoreModules.World.Estate
1004 1004
1005 #region Other Functions 1005 #region Other Functions
1006 1006
1007 private void TriggerEstateToolsSunUpdate()
1008 {
1009 float sun;
1010 if (m_scene.RegionInfo.RegionSettings.UseEstateSun)
1011 {
1012 sun = (float)m_scene.RegionInfo.EstateSettings.SunPosition;
1013 if (m_scene.RegionInfo.EstateSettings.UseGlobalTime)
1014 {
1015 sun = m_scene.EventManager.GetCurrentTimeAsSunLindenHour() - 6.0f;
1016 }
1017
1018 //
1019 m_scene.EventManager.TriggerEstateToolsSunUpdate(
1020 m_scene.RegionInfo.RegionHandle,
1021 m_scene.RegionInfo.EstateSettings.FixedSun,
1022 m_scene.RegionInfo.RegionSettings.UseEstateSun,
1023 sun);
1024 }
1025 else
1026 {
1027 // Use the Sun Position from the Region Settings
1028 sun = (float)m_scene.RegionInfo.RegionSettings.SunPosition - 6.0f;
1029
1030 m_scene.EventManager.TriggerEstateToolsSunUpdate(
1031 m_scene.RegionInfo.RegionHandle,
1032 m_scene.RegionInfo.RegionSettings.FixedSun,
1033 m_scene.RegionInfo.RegionSettings.UseEstateSun,
1034 sun);
1035 }
1036
1037
1038 }
1039
1040
1041 public void changeWaterHeight(float height) 1007 public void changeWaterHeight(float height)
1042 { 1008 {
1043 setRegionTerrainSettings(height, 1009 setRegionTerrainSettings(height,
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}