From 382b9c18ed9736c88effb869e617ca3e3792d1db Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Wed, 7 May 2008 14:15:59 +0000 Subject: From: Alan M Webb The attached patch moves the sun module incrementally nearer where it needs to be. Default behavior, i.e. no overriding configuration is to match Second Life's diurnal/nocturnal rhythm. All designated values are now sent to the client.There remain a couple of unanswered questions about how this SHOULD be implemented though. --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index f5d4ad3..d183f4a 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -1772,18 +1772,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP OutPacket(sound, ThrottleOutPacketType.Task); } - public void SendSunPos(LLVector3 sunPos, LLVector3 sunVel) + public void SendSunPos(LLVector3 Position, LLVector3 Velocity, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition) { SimulatorViewerTimeMessagePacket viewertime = (SimulatorViewerTimeMessagePacket)PacketPool.Instance.GetPacket(PacketType.SimulatorViewerTimeMessage); - viewertime.TimeInfo.SunDirection = sunPos; - viewertime.TimeInfo.SunAngVelocity = sunVel; - viewertime.TimeInfo.UsecSinceStart = (ulong)Util.UnixTimeSinceEpoch(); - viewertime.Header.Reliable = false; + viewertime.TimeInfo.SunDirection = Position; + viewertime.TimeInfo.SunAngVelocity = Velocity; + viewertime.TimeInfo.UsecSinceStart = CurrentTime; + viewertime.TimeInfo.SecPerDay = SecondsPerSunCycle; + viewertime.TimeInfo.SecPerYear = SecondsPerYear; + viewertime.TimeInfo.SunPhase = OrbitalPosition; + viewertime.Header.Reliable = false; OutPacket(viewertime, ThrottleOutPacketType.Task); } + // Currently Deprecated public void SendViewerTime(int phase) { + /* Console.WriteLine("SunPhase: {0}", phase); SimulatorViewerTimeMessagePacket viewertime = (SimulatorViewerTimeMessagePacket)PacketPool.Instance.GetPacket(PacketType.SimulatorViewerTimeMessage); //viewertime.TimeInfo.SecPerDay = 86400; @@ -1829,6 +1834,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP viewertime.TimeInfo.UsecSinceStart = (ulong)Util.UnixTimeSinceEpoch(); viewertime.Header.Reliable = false; OutPacket(viewertime, ThrottleOutPacketType.Task); + */ } public void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, @@ -5474,4 +5480,4 @@ namespace OpenSim.Region.ClientStack.LindenUDP m_sequence = info.sequence; } } -} \ No newline at end of file +} -- cgit v1.1