aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-05-07 14:15:59 +0000
committerJustin Clarke Casey2008-05-07 14:15:59 +0000
commit382b9c18ed9736c88effb869e617ca3e3792d1db (patch)
treefa263f5a5c4ee035e156990679fa56a1880fcc3c /OpenSim/Region/ClientStack
parentDe-tabify source. (diff)
downloadopensim-SC-382b9c18ed9736c88effb869e617ca3e3792d1db.zip
opensim-SC-382b9c18ed9736c88effb869e617ca3e3792d1db.tar.gz
opensim-SC-382b9c18ed9736c88effb869e617ca3e3792d1db.tar.bz2
opensim-SC-382b9c18ed9736c88effb869e617ca3e3792d1db.tar.xz
From: Alan M Webb <awebb@vnet.ibm.com>
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.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs18
1 files changed, 12 insertions, 6 deletions
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
1772 OutPacket(sound, ThrottleOutPacketType.Task); 1772 OutPacket(sound, ThrottleOutPacketType.Task);
1773 } 1773 }
1774 1774
1775 public void SendSunPos(LLVector3 sunPos, LLVector3 sunVel) 1775 public void SendSunPos(LLVector3 Position, LLVector3 Velocity, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition)
1776 { 1776 {
1777 SimulatorViewerTimeMessagePacket viewertime = (SimulatorViewerTimeMessagePacket)PacketPool.Instance.GetPacket(PacketType.SimulatorViewerTimeMessage); 1777 SimulatorViewerTimeMessagePacket viewertime = (SimulatorViewerTimeMessagePacket)PacketPool.Instance.GetPacket(PacketType.SimulatorViewerTimeMessage);
1778 viewertime.TimeInfo.SunDirection = sunPos; 1778 viewertime.TimeInfo.SunDirection = Position;
1779 viewertime.TimeInfo.SunAngVelocity = sunVel; 1779 viewertime.TimeInfo.SunAngVelocity = Velocity;
1780 viewertime.TimeInfo.UsecSinceStart = (ulong)Util.UnixTimeSinceEpoch(); 1780 viewertime.TimeInfo.UsecSinceStart = CurrentTime;
1781 viewertime.Header.Reliable = false; 1781 viewertime.TimeInfo.SecPerDay = SecondsPerSunCycle;
1782 viewertime.TimeInfo.SecPerYear = SecondsPerYear;
1783 viewertime.TimeInfo.SunPhase = OrbitalPosition;
1784 viewertime.Header.Reliable = false;
1782 OutPacket(viewertime, ThrottleOutPacketType.Task); 1785 OutPacket(viewertime, ThrottleOutPacketType.Task);
1783 } 1786 }
1784 1787
1788 // Currently Deprecated
1785 public void SendViewerTime(int phase) 1789 public void SendViewerTime(int phase)
1786 { 1790 {
1791 /*
1787 Console.WriteLine("SunPhase: {0}", phase); 1792 Console.WriteLine("SunPhase: {0}", phase);
1788 SimulatorViewerTimeMessagePacket viewertime = (SimulatorViewerTimeMessagePacket)PacketPool.Instance.GetPacket(PacketType.SimulatorViewerTimeMessage); 1793 SimulatorViewerTimeMessagePacket viewertime = (SimulatorViewerTimeMessagePacket)PacketPool.Instance.GetPacket(PacketType.SimulatorViewerTimeMessage);
1789 //viewertime.TimeInfo.SecPerDay = 86400; 1794 //viewertime.TimeInfo.SecPerDay = 86400;
@@ -1829,6 +1834,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1829 viewertime.TimeInfo.UsecSinceStart = (ulong)Util.UnixTimeSinceEpoch(); 1834 viewertime.TimeInfo.UsecSinceStart = (ulong)Util.UnixTimeSinceEpoch();
1830 viewertime.Header.Reliable = false; 1835 viewertime.Header.Reliable = false;
1831 OutPacket(viewertime, ThrottleOutPacketType.Task); 1836 OutPacket(viewertime, ThrottleOutPacketType.Task);
1837 */
1832 } 1838 }
1833 1839
1834 public void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, 1840 public void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember,
@@ -5474,4 +5480,4 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5474 m_sequence = info.sequence; 5480 m_sequence = info.sequence;
5475 } 5481 }
5476 } 5482 }
5477} \ No newline at end of file 5483}