aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs18
-rw-r--r--OpenSim/Region/Environment/Modules/World/Wind/WindModule.cs48
-rw-r--r--OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs15
3 files changed, 21 insertions, 60 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
index 3f82190..88eabe1 100644
--- a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
@@ -144,22 +144,20 @@ namespace OpenSim.Region.Environment.Modules
144 //m_log.Debug("[OFFSET]: " + hour + " - " + LindenHour + " - " + offsethours.ToString()); 144 //m_log.Debug("[OFFSET]: " + hour + " - " + LindenHour + " - " + offsethours.ToString());
145 145
146 LindenHourOffset = (long)((float)offsethours * (36000000000/m_day_length)); 146 LindenHourOffset = (long)((float)offsethours * (36000000000/m_day_length));
147 m_log.Info("[SUN]: Directive from the Estate Tools to set the sun phase to LindenHour " + GetLindenEstateHourFromCurrentTime().ToString()); 147 m_log.Debug("[SUN]: Directive from the Estate Tools to set the sun phase to LindenHour " + GetLindenEstateHourFromCurrentTime().ToString());
148 } 148 }
149 149
150 // Called immediately after the module is loaded for a given region 150 // Called immediately after the module is loaded for a given region
151 // i.e. Immediately after instance creation. 151 // i.e. Immediately after instance creation.
152 public void Initialise(Scene scene, IConfigSource config) 152 public void Initialise(Scene scene, IConfigSource config)
153 { 153 {
154 m_log.Debug("[SUN] Initializing");
155
156 m_scene = scene; 154 m_scene = scene;
157 155
158 m_frame = 0; 156 m_frame = 0;
159 157
160 TimeZone local = TimeZone.CurrentTimeZone; 158 TimeZone local = TimeZone.CurrentTimeZone;
161 TicksOffset = local.GetUtcOffset(local.ToLocalTime(DateTime.Now)).Ticks; 159 TicksOffset = local.GetUtcOffset(local.ToLocalTime(DateTime.Now)).Ticks;
162 m_log.Debug("[SUN] localtime offset is " + TicksOffset); 160 m_log.Debug("[SUN]: localtime offset is " + TicksOffset);
163 161
164 // Align ticks with Second Life 162 // Align ticks with Second Life
165 163
@@ -185,7 +183,7 @@ namespace OpenSim.Region.Environment.Modules
185 } 183 }
186 catch (Exception e) 184 catch (Exception e)
187 { 185 {
188 m_log.Debug("[SUN] Configuration access failed, using defaults. Reason: "+e.Message); 186 m_log.Debug("[SUN]: Configuration access failed, using defaults. Reason: "+e.Message);
189 m_mode = d_mode; 187 m_mode = d_mode;
190 m_year_length = d_year_length; 188 m_year_length = d_year_length;
191 m_day_length = d_day_length; 189 m_day_length = d_day_length;
@@ -231,10 +229,10 @@ namespace OpenSim.Region.Environment.Modules
231 229
232 ready = true; 230 ready = true;
233 231
234 m_log.Debug("[SUN] Mode is "+m_mode); 232 m_log.Debug("[SUN]: Mode is "+m_mode);
235 m_log.Debug("[SUN] Initialization completed. Day is "+SecondsPerSunCycle+" seconds, and year is "+m_year_length+" days"); 233 m_log.Debug("[SUN]: Initialization completed. Day is "+SecondsPerSunCycle+" seconds, and year is "+m_year_length+" days");
236 m_log.Debug("[SUN] Axis offset is "+m_day_night); 234 m_log.Debug("[SUN]: Axis offset is "+m_day_night);
237 m_log.Debug("[SUN] Positional data updated every "+m_frame_mod+" frames"); 235 m_log.Debug("[SUN]: Positional data updated every "+m_frame_mod+" frames");
238 236
239 break; 237 break;
240 } 238 }
@@ -276,7 +274,6 @@ namespace OpenSim.Region.Environment.Modules
276 if (!sunFixed) 274 if (!sunFixed)
277 GenSunPos(); // Generate shared values once 275 GenSunPos(); // Generate shared values once
278 client.SendSunPos(Position, Velocity, CurrentTime, SecondsPerSunCycle, SecondsPerYear, OrbitalPosition); 276 client.SendSunPos(Position, Velocity, CurrentTime, SecondsPerSunCycle, SecondsPerYear, OrbitalPosition);
279 m_log.Debug("[SUN] Initial update for new client");
280 } 277 }
281 } 278 }
282 } 279 }
@@ -383,7 +380,6 @@ namespace OpenSim.Region.Environment.Modules
383 if (m_rootAgents.ContainsKey(AgentId)) 380 if (m_rootAgents.ContainsKey(AgentId))
384 { 381 {
385 m_rootAgents.Remove(AgentId); 382 m_rootAgents.Remove(AgentId);
386 m_log.Info("[SUN]: Removing " + AgentId + ". Agent logged out.");
387 } 383 }
388 } 384 }
389 } 385 }
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 }
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs
index 6ce82ad..cf1900b 100644
--- a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs
@@ -122,7 +122,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
122 122
123 string regionimage = "regionImage" + m_scene.RegionInfo.RegionID.ToString(); 123 string regionimage = "regionImage" + m_scene.RegionInfo.RegionID.ToString();
124 regionimage = regionimage.Replace("-", ""); 124 regionimage = regionimage.Replace("-", "");
125 m_log.Warn("[WORLD MAP]: JPEG Map location: http://" + m_scene.RegionInfo.ExternalEndPoint.Address.ToString() + ":" + m_scene.RegionInfo.HttpPort.ToString() + "/index.php?method=" + regionimage); 125 m_log.Info("[WORLD MAP]: JPEG Map location: http://" + m_scene.RegionInfo.ExternalEndPoint.Address.ToString() + ":" + m_scene.RegionInfo.HttpPort.ToString() + "/index.php?method=" + regionimage);
126 126
127 m_scene.CommsManager.HttpServer.AddHTTPHandler(regionimage, OnHTTPGetMapImage); 127 m_scene.CommsManager.HttpServer.AddHTTPHandler(regionimage, OnHTTPGetMapImage);
128 m_scene.CommsManager.HttpServer.AddLLSDHandler( 128 m_scene.CommsManager.HttpServer.AddLLSDHandler(
@@ -137,7 +137,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
137 137
138 public void OnRegisterCaps(UUID agentID, Caps caps) 138 public void OnRegisterCaps(UUID agentID, Caps caps)
139 { 139 {
140 m_log.DebugFormat("[WORLD MAP]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps); 140 //m_log.DebugFormat("[WORLD MAP]: OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
141 string capsBase = "/CAPS/" + caps.CapsObjectPath; 141 string capsBase = "/CAPS/" + caps.CapsObjectPath;
142 caps.RegisterHandler("MapLayer", 142 caps.RegisterHandler("MapLayer",
143 new RestStreamHandler("POST", capsBase + m_mapLayerPath, 143 new RestStreamHandler("POST", capsBase + m_mapLayerPath,
@@ -286,7 +286,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
286 { 286 {
287 if (threadrunning) return; 287 if (threadrunning) return;
288 threadrunning = true; 288 threadrunning = true;
289 m_log.Warn("[WORLD MAP]: Starting remote MapItem request thread"); 289 m_log.Debug("[WORLD MAP]: Starting remote MapItem request thread");
290 mapItemReqThread = new Thread(new ThreadStart(process)); 290 mapItemReqThread = new Thread(new ThreadStart(process));
291 mapItemReqThread.IsBackground = true; 291 mapItemReqThread.IsBackground = true;
292 mapItemReqThread.Name = "MapItemRequestThread"; 292 mapItemReqThread.Name = "MapItemRequestThread";
@@ -419,7 +419,6 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
419 } 419 }
420 420
421 threadrunning = false; 421 threadrunning = false;
422 m_log.Debug("[WORLD MAP]: Remote request thread exiting");
423 } 422 }
424 423
425 /// <summary> 424 /// <summary>
@@ -557,7 +556,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
557 if (!m_blacklistedregions.ContainsKey(regionhandle)) 556 if (!m_blacklistedregions.ContainsKey(regionhandle))
558 m_blacklistedregions.Add(regionhandle, System.Environment.TickCount); 557 m_blacklistedregions.Add(regionhandle, System.Environment.TickCount);
559 } 558 }
560 m_log.WarnFormat("[WORLD MAP]: Blacklisted region {0}", regionhandle.ToString()); 559 m_log.InfoFormat("[WORLD MAP]: Blacklisted region {0}", regionhandle.ToString());
561 } 560 }
562 } 561 }
563 562
@@ -606,7 +605,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
606 } 605 }
607 catch (WebException ex) 606 catch (WebException ex)
608 { 607 {
609 m_log.InfoFormat("[WORLD MAP]: Bad send on GetMapItems {0}", ex.Message); 608 m_log.WarnFormat("[WORLD MAP]: Bad send on GetMapItems {0}", ex.Message);
610 responseMap["connect"] = OSD.FromBoolean(false); 609 responseMap["connect"] = OSD.FromBoolean(false);
611 lock (m_blacklistedurls) 610 lock (m_blacklistedurls)
612 { 611 {
@@ -716,7 +715,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
716 715
717 public Hashtable OnHTTPGetMapImage(Hashtable keysvals) 716 public Hashtable OnHTTPGetMapImage(Hashtable keysvals)
718 { 717 {
719 m_log.Info("[WORLD MAP]: Sending map image jpeg"); 718 m_log.Debug("[WORLD MAP]: Sending map image jpeg");
720 Hashtable reply = new Hashtable(); 719 Hashtable reply = new Hashtable();
721 int statuscode = 200; 720 int statuscode = 200;
722 byte[] jpeg = new byte[0]; 721 byte[] jpeg = new byte[0];
@@ -857,8 +856,6 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
857 // You may ask, why this is in a threadpool to start with.. 856 // You may ask, why this is in a threadpool to start with..
858 // The reason is so we don't cause the thread to freeze waiting 857 // The reason is so we don't cause the thread to freeze waiting
859 // for the 1 second it costs to start a thread manually. 858 // for the 1 second it costs to start a thread manually.
860
861 m_log.Warn("[WORLD MAP]: MakeRootAgent Works!");
862 if (!threadrunning) 859 if (!threadrunning)
863 ThreadPool.QueueUserWorkItem(new WaitCallback(this.StartThread)); 860 ThreadPool.QueueUserWorkItem(new WaitCallback(this.StartThread));
864 861