diff options
author | Adam Frisby | 2007-06-05 12:55:12 +0000 |
---|---|---|
committer | Adam Frisby | 2007-06-05 12:55:12 +0000 |
commit | 1e716260c8166005d3bd33f4cda68502a09994bb (patch) | |
tree | 457d68f241ca0d8b28e03fdcd1a93f6aaf75ec44 /OpenSim/OpenSim.RegionServer/world/World.cs | |
parent | * Removing dead comments (diff) | |
download | opensim-SC_OLD-1e716260c8166005d3bd33f4cda68502a09994bb.zip opensim-SC_OLD-1e716260c8166005d3bd33f4cda68502a09994bb.tar.gz opensim-SC_OLD-1e716260c8166005d3bd33f4cda68502a09994bb.tar.bz2 opensim-SC_OLD-1e716260c8166005d3bd33f4cda68502a09994bb.tar.xz |
* Removed MainConsole.Instance.WriteLine completely
* Now exists MainConsole.Instance.Error/Warn/Notice/Verbose -- use those instead
* Removed some instances of System.Console use - aiming to depreciate this in favour of MainConsole completely.
Diffstat (limited to 'OpenSim/OpenSim.RegionServer/world/World.cs')
-rw-r--r-- | OpenSim/OpenSim.RegionServer/world/World.cs | 61 |
1 files changed, 31 insertions, 30 deletions
diff --git a/OpenSim/OpenSim.RegionServer/world/World.cs b/OpenSim/OpenSim.RegionServer/world/World.cs index 92de6f0..1f15e9c 100644 --- a/OpenSim/OpenSim.RegionServer/world/World.cs +++ b/OpenSim/OpenSim.RegionServer/world/World.cs | |||
@@ -15,6 +15,7 @@ using OpenSim.Assets; | |||
15 | //using OpenSim.world.scripting; | 15 | //using OpenSim.world.scripting; |
16 | using OpenSim.RegionServer.world.scripting; | 16 | using OpenSim.RegionServer.world.scripting; |
17 | using OpenSim.Terrain; | 17 | using OpenSim.Terrain; |
18 | using OpenSim.Framework.Console; | ||
18 | 19 | ||
19 | namespace OpenSim.world | 20 | namespace OpenSim.world |
20 | { | 21 | { |
@@ -71,12 +72,12 @@ namespace OpenSim.world | |||
71 | m_scriptHandlers = new Dictionary<LLUUID, ScriptHandler>(); | 72 | m_scriptHandlers = new Dictionary<LLUUID, ScriptHandler>(); |
72 | m_scripts = new Dictionary<string, ScriptFactory>(); | 73 | m_scripts = new Dictionary<string, ScriptFactory>(); |
73 | 74 | ||
74 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs - creating new entitities instance"); | 75 | MainConsole.Instance.Notice("World.cs - creating new entitities instance"); |
75 | Entities = new Dictionary<libsecondlife.LLUUID, Entity>(); | 76 | Entities = new Dictionary<libsecondlife.LLUUID, Entity>(); |
76 | Avatars = new Dictionary<LLUUID, Avatar>(); | 77 | Avatars = new Dictionary<LLUUID, Avatar>(); |
77 | Prims = new Dictionary<LLUUID, Primitive>(); | 78 | Prims = new Dictionary<LLUUID, Primitive>(); |
78 | 79 | ||
79 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs - creating LandMap"); | 80 | MainConsole.Instance.Notice("World.cs - creating LandMap"); |
80 | TerrainManager = new TerrainManager(new SecondLife()); | 81 | TerrainManager = new TerrainManager(new SecondLife()); |
81 | Terrain = new TerrainEngine(); | 82 | Terrain = new TerrainEngine(); |
82 | Avatar.SetupTemplate("avatar-texture.dat"); | 83 | Avatar.SetupTemplate("avatar-texture.dat"); |
@@ -90,7 +91,7 @@ namespace OpenSim.world | |||
90 | } | 91 | } |
91 | catch (Exception e) | 92 | catch (Exception e) |
92 | { | 93 | { |
93 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.CRITICAL, "World.cs: Constructor failed with exception " + e.ToString()); | 94 | OpenSim.Framework.Console.MainConsole.Instance.Error("World.cs: Constructor failed with exception " + e.ToString()); |
94 | } | 95 | } |
95 | } | 96 | } |
96 | #endregion | 97 | #endregion |
@@ -110,7 +111,7 @@ namespace OpenSim.world | |||
110 | } | 111 | } |
111 | catch (Exception e) | 112 | catch (Exception e) |
112 | { | 113 | { |
113 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: AddScript() - Failed with exception " + e.ToString()); | 114 | MainConsole.Instance.Warn("World.cs: AddScript() - Failed with exception " + e.ToString()); |
114 | } | 115 | } |
115 | } | 116 | } |
116 | 117 | ||
@@ -162,7 +163,7 @@ namespace OpenSim.world | |||
162 | } | 163 | } |
163 | catch (Exception e) | 164 | catch (Exception e) |
164 | { | 165 | { |
165 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: AddScript() - Failed with exception " + e.ToString()); | 166 | MainConsole.Instance.Warn("World.cs: AddScript() - Failed with exception " + e.ToString()); |
166 | } | 167 | } |
167 | } | 168 | } |
168 | 169 | ||
@@ -216,7 +217,7 @@ namespace OpenSim.world | |||
216 | } | 217 | } |
217 | catch (Exception e) | 218 | catch (Exception e) |
218 | { | 219 | { |
219 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: Update() - Failed with exception " + e.ToString()); | 220 | MainConsole.Instance.Warn("World.cs: Update() - Failed with exception " + e.ToString()); |
220 | } | 221 | } |
221 | updateLock.ReleaseMutex(); | 222 | updateLock.ReleaseMutex(); |
222 | } | 223 | } |
@@ -229,15 +230,15 @@ namespace OpenSim.world | |||
229 | if (Terrain.tainted > 0) | 230 | if (Terrain.tainted > 0) |
230 | { | 231 | { |
231 | Terrain.tainted = 0; | 232 | Terrain.tainted = 0; |
232 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain tainted, saving."); | 233 | MainConsole.Instance.Notice("World.cs: Backup() - Terrain tainted, saving."); |
233 | localStorage.SaveMap(Terrain.getHeights1D()); | 234 | localStorage.SaveMap(Terrain.getHeights1D()); |
234 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Rebuilding world map image."); | 235 | MainConsole.Instance.Notice("World.cs: Backup() - Rebuilding world map image."); |
235 | Terrain.exportImage("map_" + m_regInfo.RegionName.ToLower() + ".png", "defaultstripe.png"); | 236 | Terrain.exportImage("map_" + m_regInfo.RegionName.ToLower() + ".png", "defaultstripe.png"); |
236 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain saved, informing Physics."); | 237 | MainConsole.Instance.Notice("World.cs: Backup() - Terrain saved, informing Physics."); |
237 | phyScene.SetTerrain(Terrain.getHeights1D()); | 238 | phyScene.SetTerrain(Terrain.getHeights1D()); |
238 | 239 | ||
239 | // Needs optimising to just send patches which have changed. | 240 | // Needs optimising to just send patches which have changed. |
240 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain changed, informing Clients."); | 241 | MainConsole.Instance.Notice("World.cs: Backup() - Terrain changed, informing Clients."); |
241 | foreach (ClientView client in m_clientThreads.Values) | 242 | foreach (ClientView client in m_clientThreads.Values) |
242 | { | 243 | { |
243 | this.SendLayerData(client); | 244 | this.SendLayerData(client); |
@@ -245,7 +246,7 @@ namespace OpenSim.world | |||
245 | } | 246 | } |
246 | 247 | ||
247 | // Primitive backup routines -- should only do if there's been a change. | 248 | // Primitive backup routines -- should only do if there's been a change. |
248 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Backing up Primitives"); | 249 | MainConsole.Instance.Notice("World.cs: Backup() - Backing up Primitives"); |
249 | foreach (libsecondlife.LLUUID UUID in Entities.Keys) | 250 | foreach (libsecondlife.LLUUID UUID in Entities.Keys) |
250 | { | 251 | { |
251 | Entities[UUID].BackUp(); | 252 | Entities[UUID].BackUp(); |
@@ -268,7 +269,7 @@ namespace OpenSim.world | |||
268 | catch (Exception e) | 269 | catch (Exception e) |
269 | { | 270 | { |
270 | // Backup failed | 271 | // Backup failed |
271 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "World.cs: Backup() - Backup Failed with exception " + e.ToString()); | 272 | OpenSim.Framework.Console.MainConsole.Instance.Error("World.cs: Backup() - Backup Failed with exception " + e.ToString()); |
272 | return false; | 273 | return false; |
273 | } | 274 | } |
274 | } | 275 | } |
@@ -314,7 +315,7 @@ namespace OpenSim.world | |||
314 | } | 315 | } |
315 | catch (Exception e) | 316 | catch (Exception e) |
316 | { | 317 | { |
317 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: LoadStorageDLL() - Failed with exception " + e.ToString()); | 318 | MainConsole.Instance.Warn("World.cs: LoadStorageDLL() - Failed with exception " + e.ToString()); |
318 | return false; | 319 | return false; |
319 | } | 320 | } |
320 | } | 321 | } |
@@ -358,7 +359,7 @@ namespace OpenSim.world | |||
358 | } | 359 | } |
359 | catch (Exception e) | 360 | catch (Exception e) |
360 | { | 361 | { |
361 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); | 362 | MainConsole.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); |
362 | } | 363 | } |
363 | } | 364 | } |
364 | 365 | ||
@@ -389,7 +390,7 @@ namespace OpenSim.world | |||
389 | } | 390 | } |
390 | catch (Exception e) | 391 | catch (Exception e) |
391 | { | 392 | { |
392 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); | 393 | MainConsole.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); |
393 | } | 394 | } |
394 | } | 395 | } |
395 | 396 | ||
@@ -415,7 +416,7 @@ namespace OpenSim.world | |||
415 | } | 416 | } |
416 | catch (Exception e) | 417 | catch (Exception e) |
417 | { | 418 | { |
418 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); | 419 | MainConsole.Instance.Warn("World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); |
419 | } | 420 | } |
420 | } | 421 | } |
421 | 422 | ||
@@ -461,7 +462,7 @@ namespace OpenSim.world | |||
461 | } | 462 | } |
462 | catch (Exception e) | 463 | catch (Exception e) |
463 | { | 464 | { |
464 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: LoadWorldMap() - Failed with exception " + e.ToString()); | 465 | MainConsole.Instance.Warn("World.cs: LoadWorldMap() - Failed with exception " + e.ToString()); |
465 | } | 466 | } |
466 | } | 467 | } |
467 | #endregion | 468 | #endregion |
@@ -487,7 +488,7 @@ namespace OpenSim.world | |||
487 | } | 488 | } |
488 | catch (Exception e) | 489 | catch (Exception e) |
489 | { | 490 | { |
490 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: GetInitialPrims() - Failed with exception " + e.ToString()); | 491 | MainConsole.Instance.Warn("World.cs: GetInitialPrims() - Failed with exception " + e.ToString()); |
491 | } | 492 | } |
492 | } | 493 | } |
493 | 494 | ||
@@ -498,12 +499,12 @@ namespace OpenSim.world | |||
498 | { | 499 | { |
499 | try | 500 | try |
500 | { | 501 | { |
501 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: LoadPrimsFromStorage() - Loading primitives"); | 502 | MainConsole.Instance.Notice("World.cs: LoadPrimsFromStorage() - Loading primitives"); |
502 | this.localStorage.LoadPrimitives(this); | 503 | this.localStorage.LoadPrimitives(this); |
503 | } | 504 | } |
504 | catch (Exception e) | 505 | catch (Exception e) |
505 | { | 506 | { |
506 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: LoadPrimsFromStorage() - Failed with exception " + e.ToString()); | 507 | MainConsole.Instance.Warn("World.cs: LoadPrimsFromStorage() - Failed with exception " + e.ToString()); |
507 | } | 508 | } |
508 | } | 509 | } |
509 | 510 | ||
@@ -519,14 +520,14 @@ namespace OpenSim.world | |||
519 | { | 520 | { |
520 | _primCount = prim.LocalID + 1; | 521 | _primCount = prim.LocalID + 1; |
521 | } | 522 | } |
522 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: PrimFromStorage() - Reloading prim (localId " + prim.LocalID + " ) from storage"); | 523 | MainConsole.Instance.Notice("World.cs: PrimFromStorage() - Reloading prim (localId " + prim.LocalID + " ) from storage"); |
523 | Primitive nPrim = new Primitive(m_clientThreads, m_regionHandle, this); | 524 | Primitive nPrim = new Primitive(m_clientThreads, m_regionHandle, this); |
524 | nPrim.CreateFromStorage(prim); | 525 | nPrim.CreateFromStorage(prim); |
525 | this.Entities.Add(nPrim.uuid, nPrim); | 526 | this.Entities.Add(nPrim.uuid, nPrim); |
526 | } | 527 | } |
527 | catch (Exception e) | 528 | catch (Exception e) |
528 | { | 529 | { |
529 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: PrimFromStorage() - Failed with exception " + e.ToString()); | 530 | MainConsole.Instance.Warn("World.cs: PrimFromStorage() - Failed with exception " + e.ToString()); |
530 | } | 531 | } |
531 | } | 532 | } |
532 | 533 | ||
@@ -539,7 +540,7 @@ namespace OpenSim.world | |||
539 | { | 540 | { |
540 | try | 541 | try |
541 | { | 542 | { |
542 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: AddNewPrim() - Creating new prim"); | 543 | MainConsole.Instance.Notice("World.cs: AddNewPrim() - Creating new prim"); |
543 | Primitive prim = new Primitive(m_clientThreads, m_regionHandle, this); | 544 | Primitive prim = new Primitive(m_clientThreads, m_regionHandle, this); |
544 | prim.CreateFromPacket(addPacket, ownerID, this._primCount); | 545 | prim.CreateFromPacket(addPacket, ownerID, this._primCount); |
545 | PhysicsVector pVec = new PhysicsVector(prim.Pos.X, prim.Pos.Y, prim.Pos.Z); | 546 | PhysicsVector pVec = new PhysicsVector(prim.Pos.X, prim.Pos.Y, prim.Pos.Z); |
@@ -557,7 +558,7 @@ namespace OpenSim.world | |||
557 | } | 558 | } |
558 | catch (Exception e) | 559 | catch (Exception e) |
559 | { | 560 | { |
560 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: AddNewPrim() - Failed with exception " + e.ToString()); | 561 | MainConsole.Instance.Warn("World.cs: AddNewPrim() - Failed with exception " + e.ToString()); |
561 | } | 562 | } |
562 | } | 563 | } |
563 | 564 | ||
@@ -590,10 +591,10 @@ namespace OpenSim.world | |||
590 | Avatar newAvatar = null; | 591 | Avatar newAvatar = null; |
591 | try | 592 | try |
592 | { | 593 | { |
593 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); | 594 | MainConsole.Instance.Notice("World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent"); |
594 | newAvatar = new Avatar(agentClient, this, m_regionName, m_clientThreads, m_regionHandle, true, 20); | 595 | newAvatar = new Avatar(agentClient, this, m_regionName, m_clientThreads, m_regionHandle, true, 20); |
595 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Adding new avatar to world"); | 596 | MainConsole.Instance.Notice("World.cs:AddViewerAgent() - Adding new avatar to world"); |
596 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs:AddViewerAgent() - Starting RegionHandshake "); | 597 | MainConsole.Instance.Notice("World.cs:AddViewerAgent() - Starting RegionHandshake "); |
597 | newAvatar.SendRegionHandshake(this); | 598 | newAvatar.SendRegionHandshake(this); |
598 | //if (!agentClient.m_child) | 599 | //if (!agentClient.m_child) |
599 | //{ | 600 | //{ |
@@ -629,7 +630,7 @@ namespace OpenSim.world | |||
629 | } | 630 | } |
630 | catch (Exception e) | 631 | catch (Exception e) |
631 | { | 632 | { |
632 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: AddViewerAgent() - Failed with exception " + e.ToString()); | 633 | MainConsole.Instance.Warn("World.cs: AddViewerAgent() - Failed with exception " + e.ToString()); |
633 | } | 634 | } |
634 | return newAvatar; | 635 | return newAvatar; |
635 | } | 636 | } |
@@ -655,7 +656,7 @@ namespace OpenSim.world | |||
655 | } | 656 | } |
656 | catch (Exception e) | 657 | catch (Exception e) |
657 | { | 658 | { |
658 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: RemoveViewerAgent() - Failed with exception " + e.ToString()); | 659 | MainConsole.Instance.Warn("World.cs: RemoveViewerAgent() - Failed with exception " + e.ToString()); |
659 | } | 660 | } |
660 | } | 661 | } |
661 | #endregion | 662 | #endregion |
@@ -689,7 +690,7 @@ namespace OpenSim.world | |||
689 | } | 690 | } |
690 | catch (Exception e) | 691 | catch (Exception e) |
691 | { | 692 | { |
692 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.HIGH, "World.cs: Close() - Failed with exception " + e.ToString()); | 693 | OpenSim.Framework.Console.MainConsole.Instance.Error("World.cs: Close() - Failed with exception " + e.ToString()); |
693 | } | 694 | } |
694 | } | 695 | } |
695 | #endregion | 696 | #endregion |