mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
Mantis#3218. Thank you kindly, TLaukkan (Tommil) for a patch that:
* Added log4net dependency to physxplugin in prebuild.xml. * Added missing m_log fields to classes. * Replaced Console.WriteLine with appropriate m_log.Xxxx * Tested that nant test target runs succesfully. * Tested that local opensim sandbox starts up without errors.
This commit is contained in:
@@ -28,11 +28,15 @@ using System;
|
||||
using OpenSim.Region.CoreModules.World.Terrain.PaintBrushes;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using log4net;
|
||||
using System.Reflection;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.World.Terrain.Effects
|
||||
{
|
||||
internal class CookieCutter : ITerrainEffect
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
#region ITerrainEffect Members
|
||||
|
||||
public void RunEffect(ITerrainChannel map)
|
||||
@@ -44,7 +48,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.Effects
|
||||
bool[,] smoothMask = new bool[map.Width,map.Height];
|
||||
bool[,] allowMask = new bool[map.Width,map.Height];
|
||||
|
||||
Console.WriteLine("S1");
|
||||
m_log.Info("S1");
|
||||
|
||||
// Step one, generate rough mask
|
||||
int x, y;
|
||||
@@ -52,7 +56,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.Effects
|
||||
{
|
||||
for (y = 0; y < map.Height; y++)
|
||||
{
|
||||
Console.Write(".");
|
||||
m_log.Info(".");
|
||||
smoothMask[x, y] = true;
|
||||
allowMask[x,y] = true;
|
||||
|
||||
@@ -71,10 +75,10 @@ namespace OpenSim.Region.CoreModules.World.Terrain.Effects
|
||||
}
|
||||
}
|
||||
|
||||
Console.WriteLine("S2");
|
||||
m_log.Info("S2");
|
||||
//smooth.FloodEffect(map, smoothMask, 4.0);
|
||||
|
||||
Console.WriteLine("S3");
|
||||
m_log.Info("S3");
|
||||
for (x = 0; x < map.Width; x++)
|
||||
{
|
||||
for (y = 0; y < map.Height; y++)
|
||||
|
||||
@@ -117,7 +117,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
}
|
||||
catch (Exception e) // LEGIT: Catching problems caused by OpenJPEG p/invoke
|
||||
{
|
||||
Console.WriteLine("Failed generating terrain map: " + e);
|
||||
m_log.Error("Failed generating terrain map: " + e);
|
||||
}
|
||||
|
||||
return imageData;
|
||||
|
||||
@@ -40,6 +40,8 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
{
|
||||
// Hue, Saturation, Value; used for color-interpolation
|
||||
struct HSV {
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public float h;
|
||||
public float s;
|
||||
public float v;
|
||||
@@ -76,10 +78,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
||||
// (for info about algorithm, see http://en.wikipedia.org/wiki/HSL_and_HSV)
|
||||
public Color toColor()
|
||||
{
|
||||
if (s < 0f) Console.WriteLine("S < 0: " + s);
|
||||
else if (s > 1f) Console.WriteLine("S > 1: " + s);
|
||||
if (v < 0f) Console.WriteLine("V < 0: " + v);
|
||||
else if (v > 1f) Console.WriteLine("V > 1: " + v);
|
||||
if (s < 0f) m_log.Debug("S < 0: " + s);
|
||||
else if (s > 1f) m_log.Debug("S > 1: " + s);
|
||||
if (v < 0f) m_log.Debug("V < 0: " + v);
|
||||
else if (v > 1f) m_log.Debug("V > 1: " + v);
|
||||
|
||||
float f = h / 60f;
|
||||
int sector = (int)f % 6;
|
||||
|
||||
Reference in New Issue
Block a user