From 2d540514f4916b51e41a388b0d7f259e1bd425d2 Mon Sep 17 00:00:00 2001
From: Teravus Ovares
Date: Fri, 30 May 2008 23:53:20 +0000
Subject: * If you check fixed sun, in the estate tools 'terrain tab', the sun
 will fix in the location you set.   (however the checkbox doesn't get
 re-populated properly yet, so it'll uncheck again even though the message got
 through to the server)

---
 OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
index e2b35c5..713060f 100644
--- a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
@@ -364,6 +364,13 @@ namespace OpenSim.Region.Environment.Modules
             // Correct angular velocity to reflect the seasonal rotation
 
             Magnitude  = LLVector3.Mag(Position);
+            if (sunFixed)
+            {
+                Velocity.X = 0;
+                Velocity.Y = 0;
+                Velocity.Z = 0;
+                return;
+            }
 
             Velocity = LLVector3.Rot(Velocity, Tilt)*((float)(1.0/Magnitude));
 
@@ -423,7 +430,7 @@ namespace OpenSim.Region.Environment.Modules
                 //if (useEstateTime)
                     //LindenHourOffset = 0;
 
-                //ForceSunUpdateToAllClients();
+                ForceSunUpdateToAllClients();
                 sunFixed = FixedTime;
                 if (sunFixed)
                     GenSunPos();
-- 
cgit v1.1