aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-01-06 21:39:55 +0000
committerJustin Clarke Casey2009-01-06 21:39:55 +0000
commita31792ee5cb1ce619f21f5b428926c4709c3f14b (patch)
treef82a09b918c277741c97fdf4dca85fe1bd8463ac /OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs
parent* Rename GetRandomCapsPath() to GetRandomCapsObjectPath() to fit in with term... (diff)
downloadopensim-SC_OLD-a31792ee5cb1ce619f21f5b428926c4709c3f14b.zip
opensim-SC_OLD-a31792ee5cb1ce619f21f5b428926c4709c3f14b.tar.gz
opensim-SC_OLD-a31792ee5cb1ce619f21f5b428926c4709c3f14b.tar.bz2
opensim-SC_OLD-a31792ee5cb1ce619f21f5b428926c4709c3f14b.tar.xz
* prune and regrade log messages relating to client login and logout
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs48
1 files changed, 8 insertions, 40 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs b/OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs
index 52eb6e7..6b06fbd 100644
--- a/OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs
@@ -37,7 +37,6 @@ namespace OpenSim.Region.Environment.Modules
37{ 37{
38 public class WindModule : IWindModule 38 public class WindModule : IWindModule
39 { 39 {
40
41 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 40 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
42 41
43 private int m_frame = 0; 42 private int m_frame = 0;
@@ -46,40 +45,14 @@ namespace OpenSim.Region.Environment.Modules
46 private Scene m_scene = null; 45 private Scene m_scene = null;
47 private bool ready = false; 46 private bool ready = false;
48 private Vector2[] windSpeeds = new Vector2[16 * 16]; 47 private Vector2[] windSpeeds = new Vector2[16 * 16];
49
50 private Dictionary<UUID, ulong> m_rootAgents = new Dictionary<UUID, ulong>(); 48 private Dictionary<UUID, ulong> m_rootAgents = new Dictionary<UUID, ulong>();
51 49
52 // Current time in elpased seconds since Jan 1st 1970
53
54
55 public void Initialise(Scene scene, IConfigSource config) 50 public void Initialise(Scene scene, IConfigSource config)
56 { 51 {
57 m_log.Debug("[WIND] Initializing");
58
59 m_scene = scene; 52 m_scene = scene;
60
61 m_frame = 0; 53 m_frame = 0;
62 54
63 55 scene.EventManager.OnFrame += WindUpdate;
64
65 // Align ticks with Second Life
66
67
68
69 // Just in case they don't have the stanzas
70 try
71 {
72
73 }
74 catch (Exception e)
75 {
76 m_log.Debug("[WIND] Configuration access failed, using defaults. Reason: " + e.Message);
77
78 }
79
80
81 scene.EventManager.OnFrame += WindUpdate;
82
83 scene.EventManager.OnMakeChildAgent += MakeChildAgent; 56 scene.EventManager.OnMakeChildAgent += MakeChildAgent;
84 scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; 57 scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
85 scene.EventManager.OnClientClosed += ClientLoggedOut; 58 scene.EventManager.OnClientClosed += ClientLoggedOut;
@@ -88,9 +61,6 @@ namespace OpenSim.Region.Environment.Modules
88 GenWindPos(); 61 GenWindPos();
89 62
90 ready = true; 63 ready = true;
91
92
93
94 } 64 }
95 65
96 public void PostInitialise() 66 public void PostInitialise()
@@ -125,13 +95,12 @@ namespace OpenSim.Region.Environment.Modules
125 95
126 public void WindToClient(IClientAPI client) 96 public void WindToClient(IClientAPI client)
127 { 97 {
128 if (ready) 98 if (ready)
129 { 99 {
130 //if (!sunFixed) 100 //if (!sunFixed)
131 //GenWindPos(); // Generate shared values once 101 //GenWindPos(); // Generate shared values once
132 client.SendWindData(windSpeeds); 102 client.SendWindData(windSpeeds);
133 m_log.Debug("[WIND] Initial update for new client"); 103 }
134 }
135 } 104 }
136 105
137 public void WindUpdate() 106 public void WindUpdate()
@@ -199,7 +168,6 @@ namespace OpenSim.Region.Environment.Modules
199 if (m_rootAgents.ContainsKey(AgentId)) 168 if (m_rootAgents.ContainsKey(AgentId))
200 { 169 {
201 m_rootAgents.Remove(AgentId); 170 m_rootAgents.Remove(AgentId);
202 m_log.Info("[WIND]: Removing " + AgentId + ". Agent logged out.");
203 } 171 }
204 } 172 }
205 } 173 }