aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Estate
diff options
context:
space:
mode:
authorOren Hurvitz2012-12-25 10:47:45 +0200
committerJustin Clark-Casey (justincc)2013-01-02 23:16:24 +0000
commit1a6694b26487e4b9bd33e1c6c4415fb7d36f0d1d (patch)
tree1f8357faff5890d6aae27277b57a6adfbbecf2db /OpenSim/Region/CoreModules/World/Estate
parentFixed: the AvatarEnteringNewParcel event wasn't triggered in some cases (diff)
downloadopensim-SC_OLD-1a6694b26487e4b9bd33e1c6c4415fb7d36f0d1d.zip
opensim-SC_OLD-1a6694b26487e4b9bd33e1c6c4415fb7d36f0d1d.tar.gz
opensim-SC_OLD-1a6694b26487e4b9bd33e1c6c4415fb7d36f0d1d.tar.bz2
opensim-SC_OLD-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/CoreModules/World/Estate')
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
index eb06fcc..d05abc5 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
@@ -118,7 +118,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
118 { 118 {
119 uint sun = 0; 119 uint sun = 0;
120 120
121 if (!Scene.RegionInfo.EstateSettings.UseGlobalTime) 121 if (Scene.RegionInfo.EstateSettings.FixedSun)
122 sun = (uint)(Scene.RegionInfo.EstateSettings.SunPosition * 1024.0) + 0x1800; 122 sun = (uint)(Scene.RegionInfo.EstateSettings.SunPosition * 1024.0) + 0x1800;
123 UUID estateOwner; 123 UUID estateOwner;
124 estateOwner = Scene.RegionInfo.EstateSettings.EstateOwner; 124 estateOwner = Scene.RegionInfo.EstateSettings.EstateOwner;
@@ -1091,6 +1091,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
1091 { 1091 {
1092 Scene.RegionInfo.EstateSettings.UseGlobalTime = false; 1092 Scene.RegionInfo.EstateSettings.UseGlobalTime = false;
1093 Scene.RegionInfo.EstateSettings.SunPosition = (parms2 - 0x1800)/1024.0; 1093 Scene.RegionInfo.EstateSettings.SunPosition = (parms2 - 0x1800)/1024.0;
1094 // Warning: FixedSun should be set to True, otherwise this sun position won't be used.
1094 } 1095 }
1095 1096
1096 if ((parms1 & 0x00000010) != 0) 1097 if ((parms1 & 0x00000010) != 0)