diff options
author | Oren Hurvitz | 2012-12-25 10:47:45 +0200 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-01-02 23:16:24 +0000 |
commit | 1a6694b26487e4b9bd33e1c6c4415fb7d36f0d1d (patch) | |
tree | 1f8357faff5890d6aae27277b57a6adfbbecf2db /OpenSim/Region/ScriptEngine/Shared/Api/Implementation | |
parent | Fixed: the AvatarEnteringNewParcel event wasn't triggered in some cases (diff) | |
download | opensim-SC-1a6694b26487e4b9bd33e1c6c4415fb7d36f0d1d.zip opensim-SC-1a6694b26487e4b9bd33e1c6c4415fb7d36f0d1d.tar.gz opensim-SC-1a6694b26487e4b9bd33e1c6c4415fb7d36f0d1d.tar.bz2 opensim-SC-1a6694b26487e4b9bd33e1c6c4415fb7d36f0d1d.tar.xz |
Fixed several problems with the Sun: some settings didn't work, or were inconsistently used. - The sun position is always calculated by combining the sun settings in the Region and Estate. This fixes the problem that 'UseEstateSun' didn't work. - To remove ambiguity, the EstateToolsSunUpdate event no longer accepts the sun's position as parameters. That's because the position is always calculated from the Region and Estate settings. - Use only the 'FixedSun' flag to determine whether the sun is fixed; not the 'UseGlobalTime' flag. - Don't change the region's 'SunPosition' field according to the sun's position: this field is used only to set the position when using a FixedSun. (The 'SunVector' field does get updated according to the sun's position in the sky)
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 828288d..33c02ef 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -1205,12 +1205,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1205 | sunHour += 24.0; | 1205 | sunHour += 24.0; |
1206 | 1206 | ||
1207 | World.RegionInfo.RegionSettings.UseEstateSun = useEstateSun; | 1207 | World.RegionInfo.RegionSettings.UseEstateSun = useEstateSun; |
1208 | World.RegionInfo.RegionSettings.SunPosition = sunHour + 6; // LL Region Sun Hour is 6 to 30 | 1208 | World.RegionInfo.RegionSettings.SunPosition = sunHour + 6; // LL Region Sun Hour is 6 to 30 |
1209 | World.RegionInfo.RegionSettings.FixedSun = sunFixed; | 1209 | World.RegionInfo.RegionSettings.FixedSun = sunFixed; |
1210 | World.RegionInfo.RegionSettings.Save(); | 1210 | World.RegionInfo.RegionSettings.Save(); |
1211 | 1211 | ||
1212 | World.EventManager.TriggerEstateToolsSunUpdate( | 1212 | World.EventManager.TriggerEstateToolsSunUpdate(World.RegionInfo.RegionHandle); |
1213 | World.RegionInfo.RegionHandle, sunFixed, useEstateSun, (float)sunHour); | ||
1214 | } | 1213 | } |
1215 | 1214 | ||
1216 | /// <summary> | 1215 | /// <summary> |
@@ -1235,8 +1234,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1235 | World.RegionInfo.EstateSettings.FixedSun = sunFixed; | 1234 | World.RegionInfo.EstateSettings.FixedSun = sunFixed; |
1236 | World.RegionInfo.EstateSettings.Save(); | 1235 | World.RegionInfo.EstateSettings.Save(); |
1237 | 1236 | ||
1238 | World.EventManager.TriggerEstateToolsSunUpdate( | 1237 | World.EventManager.TriggerEstateToolsSunUpdate(World.RegionInfo.RegionHandle); |
1239 | World.RegionInfo.RegionHandle, sunFixed, World.RegionInfo.RegionSettings.UseEstateSun, (float)sunHour); | ||
1240 | } | 1238 | } |
1241 | 1239 | ||
1242 | /// <summary> | 1240 | /// <summary> |