From 4f93d30790c8392c6f91cb1818d1c16f89169ab7 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 4 May 2010 18:10:13 +0200 Subject: 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. --- .../World/Estate/EstateManagementModule.cs | 40 ++-------------------- 1 file changed, 3 insertions(+), 37 deletions(-) (limited to 'OpenSim/Region/CoreModules') 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 m_scene.RegionInfo.RegionSettings.FixedSun = UseFixedSun; m_scene.RegionInfo.RegionSettings.SunPosition = SunHour; - TriggerEstateToolsSunUpdate(); + m_scene.TriggerEstateSunUpdate(); //m_log.Debug("[ESTATE]: UFS: " + UseFixedSun.ToString()); //m_log.Debug("[ESTATE]: SunHour: " + SunHour.ToString()); @@ -861,7 +861,7 @@ namespace OpenSim.Region.CoreModules.World.Estate m_scene.RegionInfo.EstateSettings.Save(); - TriggerEstateToolsSunUpdate(); + m_scene.TriggerEstateSunUpdate(); sendDetailedEstateData(remoteClient, invoice); } @@ -983,7 +983,7 @@ namespace OpenSim.Region.CoreModules.World.Estate { // Sets up the sun module based no the saved Estate and Region Settings // DO NOT REMOVE or the sun will stop working - TriggerEstateToolsSunUpdate(); + m_scene.TriggerEstateSunUpdate(); } public void Close() @@ -1004,40 +1004,6 @@ namespace OpenSim.Region.CoreModules.World.Estate #region Other Functions - private void TriggerEstateToolsSunUpdate() - { - float sun; - if (m_scene.RegionInfo.RegionSettings.UseEstateSun) - { - sun = (float)m_scene.RegionInfo.EstateSettings.SunPosition; - if (m_scene.RegionInfo.EstateSettings.UseGlobalTime) - { - sun = m_scene.EventManager.GetCurrentTimeAsSunLindenHour() - 6.0f; - } - - // - m_scene.EventManager.TriggerEstateToolsSunUpdate( - m_scene.RegionInfo.RegionHandle, - m_scene.RegionInfo.EstateSettings.FixedSun, - m_scene.RegionInfo.RegionSettings.UseEstateSun, - sun); - } - else - { - // Use the Sun Position from the Region Settings - sun = (float)m_scene.RegionInfo.RegionSettings.SunPosition - 6.0f; - - m_scene.EventManager.TriggerEstateToolsSunUpdate( - m_scene.RegionInfo.RegionHandle, - m_scene.RegionInfo.RegionSettings.FixedSun, - m_scene.RegionInfo.RegionSettings.UseEstateSun, - sun); - } - - - } - - public void changeWaterHeight(float height) { setRegionTerrainSettings(height, -- cgit v1.1