aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-09-06 07:52:41 +0000
committerTeravus Ovares2008-09-06 07:52:41 +0000
commit7d89e122930be39e84a6d174548fa2d12ac0484a (patch)
treee5aa5752f988a9aba2a969f49e5e208985eda80c /OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
parent* minor: speculatively try a change to bamboo.build to see if this generates ... (diff)
downloadopensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.zip
opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.gz
opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.bz2
opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.xz
* This is the fabled LibOMV update with all of the libOMV types from JHurliman
* This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point. Regular people should let the dust settle. * This has been tested to work with most basic functions. However.. make sure you back up 'everything' before using this. It's that big! * Essentially we're back at square 1 in the testing phase.. so lets identify things that broke.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs23
1 files changed, 11 insertions, 12 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
index 9690433..826fe93 100644
--- a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using libsecondlife; 30using OpenMetaverse;
31using Nini.Config; 31using Nini.Config;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.Environment.Interfaces; 33using OpenSim.Region.Environment.Interfaces;
@@ -91,14 +91,14 @@ namespace OpenSim.Region.Environment.Modules
91 // private double VWTimeRatio; // VW time as a ratio of real time 91 // private double VWTimeRatio; // VW time as a ratio of real time
92 92
93 // Working values 93 // Working values
94 private LLVector3 Position = new LLVector3(0,0,0); 94 private Vector3 Position = Vector3.Zero;
95 private LLVector3 Velocity = new LLVector3(0,0,0); 95 private Vector3 Velocity = Vector3.Zero;
96 private LLQuaternion Tilt = new LLQuaternion(1,0,0,0); 96 private Quaternion Tilt = Quaternion.Identity;
97 97
98 private long LindenHourOffset = 0; 98 private long LindenHourOffset = 0;
99 private bool sunFixed = false; 99 private bool sunFixed = false;
100 100
101 private Dictionary<LLUUID, ulong> m_rootAgents = new Dictionary<LLUUID, ulong>(); 101 private Dictionary<UUID, ulong> m_rootAgents = new Dictionary<UUID, ulong>();
102 102
103 // Current time in elpased seconds since Jan 1st 1970 103 // Current time in elpased seconds since Jan 1st 1970
104 private ulong CurrentTime 104 private ulong CurrentTime
@@ -348,14 +348,14 @@ namespace OpenSim.Region.Environment.Modules
348 // For interest we rotate it slightly about the X access. 348 // For interest we rotate it slightly about the X access.
349 // Celestial tilt is a value that ranges .025 349 // Celestial tilt is a value that ranges .025
350 350
351 Position = LLVector3.Rot(Position,Tilt); 351 Position *= Tilt;
352 352
353 // Finally we shift the axis so that more of the 353 // Finally we shift the axis so that more of the
354 // circle is above the horizon than below. This 354 // circle is above the horizon than below. This
355 // makes the nights shorter than the days. 355 // makes the nights shorter than the days.
356 356
357 Position.Z = Position.Z + (float) HorizonShift; 357 Position.Z = Position.Z + (float) HorizonShift;
358 Position = LLVector3.Norm(Position); 358 Position = Vector3.Normalize(Position);
359 359
360 // m_log.Debug("[SUN] Position("+Position.X+","+Position.Y+","+Position.Z+")"); 360 // m_log.Debug("[SUN] Position("+Position.X+","+Position.Y+","+Position.Z+")");
361 361
@@ -365,7 +365,7 @@ namespace OpenSim.Region.Environment.Modules
365 365
366 // Correct angular velocity to reflect the seasonal rotation 366 // Correct angular velocity to reflect the seasonal rotation
367 367
368 Magnitude = LLVector3.Mag(Position); 368 Magnitude = Position.Length();
369 if (sunFixed) 369 if (sunFixed)
370 { 370 {
371 Velocity.X = 0; 371 Velocity.X = 0;
@@ -374,13 +374,12 @@ namespace OpenSim.Region.Environment.Modules
374 return; 374 return;
375 } 375 }
376 376
377 Velocity = LLVector3.Rot(Velocity, Tilt)*((float)(1.0/Magnitude)); 377 Velocity = (Velocity * Tilt) * (1.0f / Magnitude);
378 378
379 // m_log.Debug("[SUN] Velocity("+Velocity.X+","+Velocity.Y+","+Velocity.Z+")"); 379 // m_log.Debug("[SUN] Velocity("+Velocity.X+","+Velocity.Y+","+Velocity.Z+")");
380
381 } 380 }
382 381
383 private void ClientLoggedOut(LLUUID AgentId) 382 private void ClientLoggedOut(UUID AgentId)
384 { 383 {
385 lock (m_rootAgents) 384 lock (m_rootAgents)
386 { 385 {
@@ -392,7 +391,7 @@ namespace OpenSim.Region.Environment.Modules
392 } 391 }
393 } 392 }
394 393
395 private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, LLUUID regionID) 394 private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID)
396 { 395 {
397 lock (m_rootAgents) 396 lock (m_rootAgents)
398 { 397 {