diff options
author | Melanie Thielker | 2009-03-13 23:45:02 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-03-13 23:45:02 +0000 |
commit | ddbf81fa07aac8098d9fa8d979969fffd5436f75 (patch) | |
tree | d65b3b280a53fe74253af2bfeee9bf3944dfa10b /OpenSim/Region/ScriptEngine/Shared/Api/Implementation | |
parent | * Support loading empty folders in an iar (diff) | |
download | opensim-SC_OLD-ddbf81fa07aac8098d9fa8d979969fffd5436f75.zip opensim-SC_OLD-ddbf81fa07aac8098d9fa8d979969fffd5436f75.tar.gz opensim-SC_OLD-ddbf81fa07aac8098d9fa8d979969fffd5436f75.tar.bz2 opensim-SC_OLD-ddbf81fa07aac8098d9fa8d979969fffd5436f75.tar.xz |
Thank you, mcortez, for a patch that fixes a number of long standing
issues with the sun module.
Fixes Mantis #3295
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index e96dd26..6b3afe0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -754,6 +754,33 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
754 | } | 754 | } |
755 | } | 755 | } |
756 | 756 | ||
757 | /// <summary> | ||
758 | /// Changes the Region Sun Settings, then Triggers a Sun Update | ||
759 | /// </summary> | ||
760 | /// <param name="useEstateSun">True to use Estate Sun instead of Region Sun</param> | ||
761 | /// <param name="sunFixed">True to keep the sun stationary</param> | ||
762 | /// <param name="sunHour">The "Sun Hour" that is desired, 0...24, with 0 just after SunRise</param> | ||
763 | public void osSetRegionSunSettings(bool useEstateSun, bool sunFixed, double sunHour) | ||
764 | { | ||
765 | CheckThreatLevel(ThreatLevel.Nuisance, "osSetRegionSunSettings"); | ||
766 | |||
767 | m_host.AddScriptLPS(1); | ||
768 | //Check to make sure that the script's owner is the estate manager/master | ||
769 | //World.Permissions.GenericEstatePermission( | ||
770 | if (World.Permissions.IsGod(m_host.OwnerID)) | ||
771 | { | ||
772 | World.RegionInfo.RegionSettings.UseEstateSun = useEstateSun; | ||
773 | World.RegionInfo.RegionSettings.SunPosition = sunHour + 6; // LL Region Sun Hour is 6 to 30 | ||
774 | World.RegionInfo.RegionSettings.FixedSun = sunFixed; | ||
775 | World.RegionInfo.RegionSettings.Save(); | ||
776 | |||
777 | World.EventManager.TriggerEstateToolsSunUpdate(World.RegionInfo.RegionHandle, sunFixed, useEstateSun, (float)sunHour); | ||
778 | } | ||
779 | } | ||
780 | |||
781 | |||
782 | |||
783 | |||
757 | public double osList2Double(LSL_Types.list src, int index) | 784 | public double osList2Double(LSL_Types.list src, int index) |
758 | { | 785 | { |
759 | // There is really no double type in OSSL. C# and other | 786 | // There is really no double type in OSSL. C# and other |