OpenSim.Region.ScriptEngine.Shared.Api.OSSL_Api.osSetEstateSunSettings C# (CSharp) Метод

osSetEstateSunSettings() публичный Метод

Changes the Estate Sun Settings, then Triggers a Sun Update
public osSetEstateSunSettings ( bool sunFixed, double sunHour ) : void
sunFixed bool True to keep the sun stationary, false to use global time
sunHour double The "Sun Hour" that is desired, 0...24, with 0 just after SunRise
Результат void
        public void osSetEstateSunSettings(bool sunFixed, double sunHour)
        {
            CheckThreatLevel(ThreatLevel.High, "osSetEstateSunSettings");

            m_host.AddScriptLPS(1);

            while (sunHour > 24.0)
                sunHour -= 24.0;

            while (sunHour < 0)
                sunHour += 24.0;

            World.RegionInfo.EstateSettings.UseGlobalTime = !sunFixed;
            World.RegionInfo.EstateSettings.SunPosition = sunHour;
            World.RegionInfo.EstateSettings.FixedSun = sunFixed;
            World.EstateDataService.StoreEstateSettings(World.RegionInfo.EstateSettings);

            World.EventManager.TriggerEstateToolsSunUpdate(World.RegionInfo.RegionHandle);
        }
OSSL_Api