diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
3 files changed, 15 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/World/Terrain/Effects/CookieCutter.cs b/OpenSim/Region/CoreModules/World/Terrain/Effects/CookieCutter.cs index 1824231..58b02f9 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/Effects/CookieCutter.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/Effects/CookieCutter.cs | |||
@@ -28,11 +28,15 @@ using System; | |||
28 | using OpenSim.Region.CoreModules.World.Terrain.PaintBrushes; | 28 | using OpenSim.Region.CoreModules.World.Terrain.PaintBrushes; |
29 | using OpenSim.Region.Framework.Interfaces; | 29 | using OpenSim.Region.Framework.Interfaces; |
30 | using OpenSim.Region.Framework.Scenes; | 30 | using OpenSim.Region.Framework.Scenes; |
31 | using log4net; | ||
32 | using System.Reflection; | ||
31 | 33 | ||
32 | namespace OpenSim.Region.CoreModules.World.Terrain.Effects | 34 | namespace OpenSim.Region.CoreModules.World.Terrain.Effects |
33 | { | 35 | { |
34 | internal class CookieCutter : ITerrainEffect | 36 | internal class CookieCutter : ITerrainEffect |
35 | { | 37 | { |
38 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
39 | |||
36 | #region ITerrainEffect Members | 40 | #region ITerrainEffect Members |
37 | 41 | ||
38 | public void RunEffect(ITerrainChannel map) | 42 | public void RunEffect(ITerrainChannel map) |
@@ -44,7 +48,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.Effects | |||
44 | bool[,] smoothMask = new bool[map.Width,map.Height]; | 48 | bool[,] smoothMask = new bool[map.Width,map.Height]; |
45 | bool[,] allowMask = new bool[map.Width,map.Height]; | 49 | bool[,] allowMask = new bool[map.Width,map.Height]; |
46 | 50 | ||
47 | Console.WriteLine("S1"); | 51 | m_log.Info("S1"); |
48 | 52 | ||
49 | // Step one, generate rough mask | 53 | // Step one, generate rough mask |
50 | int x, y; | 54 | int x, y; |
@@ -52,7 +56,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.Effects | |||
52 | { | 56 | { |
53 | for (y = 0; y < map.Height; y++) | 57 | for (y = 0; y < map.Height; y++) |
54 | { | 58 | { |
55 | Console.Write("."); | 59 | m_log.Info("."); |
56 | smoothMask[x, y] = true; | 60 | smoothMask[x, y] = true; |
57 | allowMask[x,y] = true; | 61 | allowMask[x,y] = true; |
58 | 62 | ||
@@ -71,10 +75,10 @@ namespace OpenSim.Region.CoreModules.World.Terrain.Effects | |||
71 | } | 75 | } |
72 | } | 76 | } |
73 | 77 | ||
74 | Console.WriteLine("S2"); | 78 | m_log.Info("S2"); |
75 | //smooth.FloodEffect(map, smoothMask, 4.0); | 79 | //smooth.FloodEffect(map, smoothMask, 4.0); |
76 | 80 | ||
77 | Console.WriteLine("S3"); | 81 | m_log.Info("S3"); |
78 | for (x = 0; x < map.Width; x++) | 82 | for (x = 0; x < map.Width; x++) |
79 | { | 83 | { |
80 | for (y = 0; y < map.Height; y++) | 84 | for (y = 0; y < map.Height; y++) |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs index b091c60..5b28430 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/MapImageModule.cs | |||
@@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
117 | } | 117 | } |
118 | catch (Exception e) // LEGIT: Catching problems caused by OpenJPEG p/invoke | 118 | catch (Exception e) // LEGIT: Catching problems caused by OpenJPEG p/invoke |
119 | { | 119 | { |
120 | Console.WriteLine("Failed generating terrain map: " + e); | 120 | m_log.Error("Failed generating terrain map: " + e); |
121 | } | 121 | } |
122 | 122 | ||
123 | return imageData; | 123 | return imageData; |
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs b/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs index 8f61af7..1ab8e26 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/TexturedMapTileRenderer.cs | |||
@@ -40,6 +40,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
40 | { | 40 | { |
41 | // Hue, Saturation, Value; used for color-interpolation | 41 | // Hue, Saturation, Value; used for color-interpolation |
42 | struct HSV { | 42 | struct HSV { |
43 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | |||
43 | public float h; | 45 | public float h; |
44 | public float s; | 46 | public float s; |
45 | public float v; | 47 | public float v; |
@@ -76,10 +78,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
76 | // (for info about algorithm, see http://en.wikipedia.org/wiki/HSL_and_HSV) | 78 | // (for info about algorithm, see http://en.wikipedia.org/wiki/HSL_and_HSV) |
77 | public Color toColor() | 79 | public Color toColor() |
78 | { | 80 | { |
79 | if (s < 0f) Console.WriteLine("S < 0: " + s); | 81 | if (s < 0f) m_log.Debug("S < 0: " + s); |
80 | else if (s > 1f) Console.WriteLine("S > 1: " + s); | 82 | else if (s > 1f) m_log.Debug("S > 1: " + s); |
81 | if (v < 0f) Console.WriteLine("V < 0: " + v); | 83 | if (v < 0f) m_log.Debug("V < 0: " + v); |
82 | else if (v > 1f) Console.WriteLine("V > 1: " + v); | 84 | else if (v > 1f) m_log.Debug("V > 1: " + v); |
83 | 85 | ||
84 | float f = h / 60f; | 86 | float f = h / 60f; |
85 | int sector = (int)f % 6; | 87 | int sector = (int)f % 6; |