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:
@@ -176,7 +176,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||
public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type,
|
||||
byte[] data, bool storeLocal, bool tempFile)
|
||||
{
|
||||
//System.Console.WriteLine("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile);
|
||||
//m_log.Debug("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile);
|
||||
if (((AssetType)type == AssetType.Texture ||
|
||||
(AssetType)type == AssetType.Sound ||
|
||||
(AssetType)type == AssetType.TextureTGA ||
|
||||
@@ -196,7 +196,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||
}
|
||||
}
|
||||
|
||||
//Console.WriteLine("asset upload of " + assetID);
|
||||
//m_log.Debug("asset upload of " + assetID);
|
||||
AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId);
|
||||
|
||||
AssetXferUploader uploader = transactions.RequestXferUploader(transaction);
|
||||
@@ -216,7 +216,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||
/// <param name="data"></param>
|
||||
public void HandleXfer(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data)
|
||||
{
|
||||
//System.Console.WriteLine("xferID: " + xferID + " packetID: " + packetID + " data!");
|
||||
//m_log.Debug("xferID: " + xferID + " packetID: " + packetID + " data!");
|
||||
AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId);
|
||||
|
||||
transactions.HandleXfer(xferID, packetID, data);
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||
|
||||
public AssetTransactionModule()
|
||||
{
|
||||
// System.Console.WriteLine("creating AgentAssetTransactionModule");
|
||||
//m_log.Debug("creating AgentAssetTransactionModule");
|
||||
}
|
||||
|
||||
#region IRegionModule Members
|
||||
@@ -64,7 +64,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||
{
|
||||
if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
|
||||
{
|
||||
// System.Console.WriteLine("initialising AgentAssetTransactionModule");
|
||||
// m_log.Debug("initialising AgentAssetTransactionModule");
|
||||
RegisteredScenes.Add(scene.RegionInfo.RegionID, scene);
|
||||
scene.RegisterModuleInterface<IAgentAssetTransactions>(this);
|
||||
|
||||
@@ -237,7 +237,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||
public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type,
|
||||
byte[] data, bool storeLocal, bool tempFile)
|
||||
{
|
||||
//System.Console.WriteLine("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile);
|
||||
//m_log.Debug("HandleUDPUploadRequest - assetID: " + assetID.ToString() + " transaction: " + transaction.ToString() + " type: " + type.ToString() + " storelocal: " + storeLocal + " tempFile: " + tempFile);
|
||||
if (((AssetType)type == AssetType.Texture ||
|
||||
(AssetType)type == AssetType.Sound ||
|
||||
(AssetType)type == AssetType.TextureTGA ||
|
||||
@@ -257,7 +257,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||
}
|
||||
}
|
||||
|
||||
//Console.WriteLine("asset upload of " + assetID);
|
||||
//m_log.Debug("asset upload of " + assetID);
|
||||
AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId);
|
||||
|
||||
AssetXferUploader uploader = transactions.RequestXferUploader(transaction);
|
||||
@@ -277,7 +277,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
|
||||
/// <param name="data"></param>
|
||||
public void HandleXfer(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data)
|
||||
{
|
||||
//System.Console.WriteLine("xferID: " + xferID + " packetID: " + packetID + " data!");
|
||||
//m_log.Debug("xferID: " + xferID + " packetID: " + packetID + " data!");
|
||||
AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId);
|
||||
|
||||
transactions.HandleXfer(xferID, packetID, data);
|
||||
|
||||
@@ -188,21 +188,21 @@ namespace OpenSim.Region.CoreModules.Agent.Capabilities
|
||||
|
||||
public void SetChildrenSeed(UUID agentID, Dictionary<ulong, string> seeds)
|
||||
{
|
||||
//Console.WriteLine(" !!! Setting child seeds in {0} to {1}", RegionInfo.RegionName, value.Count);
|
||||
//m_log.Debug(" !!! Setting child seeds in {0} to {1}", RegionInfo.RegionName, value.Count);
|
||||
childrenSeeds[agentID] = seeds;
|
||||
}
|
||||
|
||||
public void DumpChildrenSeeds(UUID agentID)
|
||||
{
|
||||
Console.WriteLine("================ ChildrenSeed {0} ================", m_scene.RegionInfo.RegionName);
|
||||
m_log.Info("================ ChildrenSeed "+m_scene.RegionInfo.RegionName+" ================");
|
||||
foreach (KeyValuePair<ulong, string> kvp in childrenSeeds[agentID])
|
||||
{
|
||||
uint x, y;
|
||||
Utils.LongToUInts(kvp.Key, out x, out y);
|
||||
x = x / Constants.RegionSize;
|
||||
y = y / Constants.RegionSize;
|
||||
Console.WriteLine(" >> {0}, {1}: {2}", x, y, kvp.Value);
|
||||
m_log.Info(" >> "+x+", "+y+": "+kvp.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload
|
||||
{
|
||||
if (m_scene == null)
|
||||
{
|
||||
//Console.WriteLine("Creating Texture download module");
|
||||
//m_log.Debug("Creating Texture download module");
|
||||
m_scene = scene;
|
||||
m_thread = new Thread(new ThreadStart(ProcessTextureSenders));
|
||||
m_thread.Name = "ProcessTextureSenderThread";
|
||||
|
||||
@@ -168,7 +168,7 @@ namespace OpenSim.Region.CoreModules.Communications.Local
|
||||
//Utils.LongToUInts(regionHandle, out x, out y);
|
||||
//x = x / Constants.RegionSize;
|
||||
//y = y / Constants.RegionSize;
|
||||
//Console.WriteLine("\n >>> Local SendReleaseAgent " + x + "-" + y);
|
||||
//m_log.Debug("\n >>> Local SendReleaseAgent " + x + "-" + y);
|
||||
foreach (Scene s in m_sceneList)
|
||||
{
|
||||
if (s.RegionInfo.RegionHandle == regionHandle)
|
||||
@@ -187,7 +187,7 @@ namespace OpenSim.Region.CoreModules.Communications.Local
|
||||
//Utils.LongToUInts(regionHandle, out x, out y);
|
||||
//x = x / Constants.RegionSize;
|
||||
//y = y / Constants.RegionSize;
|
||||
//Console.WriteLine("\n >>> Local SendCloseAgent " + x + "-" + y);
|
||||
//m_log.Debug("\n >>> Local SendCloseAgent " + x + "-" + y);
|
||||
foreach (Scene s in m_sceneList)
|
||||
{
|
||||
if (s.RegionInfo.RegionHandle == regionHandle)
|
||||
|
||||
@@ -273,7 +273,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
|
||||
{
|
||||
// Eventually, we want to use a caps url instead of the agentID
|
||||
string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/agent/" + aCircuit.AgentID + "/";
|
||||
//Console.WriteLine(" >>> DoCreateChildAgentCall <<< " + uri);
|
||||
//m_log.Debug(" >>> DoCreateChildAgentCall <<< " + uri);
|
||||
|
||||
WebRequest AgentCreateRequest = WebRequest.Create(uri);
|
||||
AgentCreateRequest.Method = "POST";
|
||||
@@ -358,7 +358,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
|
||||
{
|
||||
// Eventually, we want to use a caps url instead of the agentID
|
||||
string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/agent/" + cAgentData.AgentID + "/";
|
||||
//Console.WriteLine(" >>> DoChildAgentUpdateCall <<< " + uri);
|
||||
//m_log.Debug(" >>> DoChildAgentUpdateCall <<< " + uri);
|
||||
|
||||
WebRequest ChildUpdateRequest = WebRequest.Create(uri);
|
||||
ChildUpdateRequest.Method = "PUT";
|
||||
@@ -440,7 +440,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
|
||||
|
||||
protected bool DoReleaseAgentCall(ulong regionHandle, UUID id, string uri)
|
||||
{
|
||||
//Console.WriteLine(" >>> DoReleaseAgentCall <<< " + uri);
|
||||
//m_log.Debug(" >>> DoReleaseAgentCall <<< " + uri);
|
||||
|
||||
WebRequest request = WebRequest.Create(uri);
|
||||
request.Method = "DELETE";
|
||||
@@ -474,7 +474,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
|
||||
{
|
||||
string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/agent/" + id + "/" + region.RegionHandle.ToString() +"/";
|
||||
|
||||
//Console.WriteLine(" >>> DoCloseAgentCall <<< " + uri);
|
||||
//m_log.Debug(" >>> DoCloseAgentCall <<< " + uri);
|
||||
|
||||
WebRequest request = WebRequest.Create(uri);
|
||||
request.Method = "DELETE";
|
||||
@@ -508,7 +508,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
|
||||
{
|
||||
ulong regionHandle = GetRegionHandle(region.RegionHandle);
|
||||
string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/object/" + sog.UUID + "/" + regionHandle.ToString() + "/";
|
||||
//Console.WriteLine(" >>> DoCreateChildAgentCall <<< " + uri);
|
||||
//m_log.Debug(" >>> DoCreateChildAgentCall <<< " + uri);
|
||||
|
||||
WebRequest ObjectCreateRequest = WebRequest.Create(uri);
|
||||
ObjectCreateRequest.Method = "POST";
|
||||
@@ -588,7 +588,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
|
||||
protected bool DoHelloNeighbourCall(RegionInfo region, RegionInfo thisRegion)
|
||||
{
|
||||
string uri = "http://" + region.ExternalEndPoint.Address + ":" + region.HttpPort + "/region/" + thisRegion.RegionID + "/";
|
||||
//Console.WriteLine(" >>> DoHelloNeighbourCall <<< " + uri);
|
||||
//m_log.Debug(" >>> DoHelloNeighbourCall <<< " + uri);
|
||||
|
||||
WebRequest HelloNeighbourRequest = WebRequest.Create(uri);
|
||||
HelloNeighbourRequest.Method = "POST";
|
||||
@@ -681,11 +681,11 @@ namespace OpenSim.Region.CoreModules.Communications.REST
|
||||
{
|
||||
//m_log.Debug("[CONNECTION DEBUGGING]: AgentHandler Called");
|
||||
|
||||
//Console.WriteLine("---------------------------");
|
||||
//Console.WriteLine(" >> uri=" + request["uri"]);
|
||||
//Console.WriteLine(" >> content-type=" + request["content-type"]);
|
||||
//Console.WriteLine(" >> http-method=" + request["http-method"]);
|
||||
//Console.WriteLine("---------------------------\n");
|
||||
//m_log.Debug("---------------------------");
|
||||
//m_log.Debug(" >> uri=" + request["uri"]);
|
||||
//m_log.Debug(" >> content-type=" + request["content-type"]);
|
||||
//m_log.Debug(" >> http-method=" + request["http-method"]);
|
||||
//m_log.Debug("---------------------------\n");
|
||||
|
||||
Hashtable responsedata = new Hashtable();
|
||||
responsedata["content_type"] = "text/html";
|
||||
@@ -833,7 +833,7 @@ namespace OpenSim.Region.CoreModules.Communications.REST
|
||||
|
||||
protected virtual void DoAgentDelete(Hashtable request, Hashtable responsedata, UUID id, string action, ulong regionHandle)
|
||||
{
|
||||
//Console.WriteLine(" >>> DoDelete action:" + action + "; regionHandle:" + regionHandle);
|
||||
//m_log.Debug(" >>> DoDelete action:" + action + "; regionHandle:" + regionHandle);
|
||||
|
||||
if (action.Equals("release"))
|
||||
m_localBackend.SendReleaseAgent(regionHandle, id, "");
|
||||
@@ -852,11 +852,11 @@ namespace OpenSim.Region.CoreModules.Communications.REST
|
||||
{
|
||||
//m_log.Debug("[CONNECTION DEBUGGING]: ObjectHandler Called");
|
||||
|
||||
//Console.WriteLine("---------------------------");
|
||||
//Console.WriteLine(" >> uri=" + request["uri"]);
|
||||
//Console.WriteLine(" >> content-type=" + request["content-type"]);
|
||||
//Console.WriteLine(" >> http-method=" + request["http-method"]);
|
||||
//Console.WriteLine("---------------------------\n");
|
||||
//m_log.Debug("---------------------------");
|
||||
//m_log.Debug(" >> uri=" + request["uri"]);
|
||||
//m_log.Debug(" >> content-type=" + request["content-type"]);
|
||||
//m_log.Debug(" >> http-method=" + request["http-method"]);
|
||||
//m_log.Debug("---------------------------\n");
|
||||
|
||||
Hashtable responsedata = new Hashtable();
|
||||
responsedata["content_type"] = "text/html";
|
||||
@@ -964,11 +964,11 @@ namespace OpenSim.Region.CoreModules.Communications.REST
|
||||
{
|
||||
//m_log.Debug("[CONNECTION DEBUGGING]: RegionHandler Called");
|
||||
|
||||
//Console.WriteLine("---------------------------");
|
||||
//Console.WriteLine(" >> uri=" + request["uri"]);
|
||||
//Console.WriteLine(" >> content-type=" + request["content-type"]);
|
||||
//Console.WriteLine(" >> http-method=" + request["http-method"]);
|
||||
//Console.WriteLine("---------------------------\n");
|
||||
//m_log.Debug("---------------------------");
|
||||
//m_log.Debug(" >> uri=" + request["uri"]);
|
||||
//m_log.Debug(" >> content-type=" + request["content-type"]);
|
||||
//m_log.Debug(" >> http-method=" + request["http-method"]);
|
||||
//m_log.Debug("---------------------------\n");
|
||||
|
||||
Hashtable responsedata = new Hashtable();
|
||||
responsedata["content_type"] = "text/html";
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace OpenSim.Region.CoreModules.Hypergrid
|
||||
//m_scene.ForEachScenePresence(delegate (ScenePresence sp) {
|
||||
// if (!sp.IsChildAgent && sp.UUID == remoteClient.AgentId)
|
||||
// {
|
||||
// Console.WriteLine("XXX Root agent");
|
||||
// m_log.Debug("XXX Root agent");
|
||||
// DoRequestMapBlocks(remoteClient, minX, minY, maxX, maxY, flag);
|
||||
// }
|
||||
//};
|
||||
|
||||
@@ -375,7 +375,7 @@ namespace OpenSim.Region.CoreModules.InterGrid
|
||||
|
||||
public OSD RequestRezAvatarMethod(string path, OSD request)
|
||||
{
|
||||
//System.Console.WriteLine("[REQUESTREZAVATAR]: " + request.ToString());
|
||||
//m_log.Debug("[REQUESTREZAVATAR]: " + request.ToString());
|
||||
|
||||
OSDMap requestMap = (OSDMap)request;
|
||||
|
||||
@@ -602,7 +602,7 @@ namespace OpenSim.Region.CoreModules.InterGrid
|
||||
}
|
||||
}
|
||||
|
||||
//System.Console.WriteLine("Response:" + responseMap.ToString());
|
||||
//m_log.Debug("Response:" + responseMap.ToString());
|
||||
return responseMap;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ using OpenMetaverse.Imaging;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using log4net;
|
||||
using System.Reflection;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
|
||||
{
|
||||
@@ -86,7 +88,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
|
||||
{
|
||||
if (RenderPlugins.ContainsKey(contentType))
|
||||
{
|
||||
//Console.WriteLine("dynamic texture being created: " + url + " of type " + contentType);
|
||||
//m_log.Debug("dynamic texture being created: " + url + " of type " + contentType);
|
||||
|
||||
DynamicTextureUpdater updater = new DynamicTextureUpdater();
|
||||
updater.SimUUID = simID;
|
||||
@@ -192,6 +194,8 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
|
||||
|
||||
public class DynamicTextureUpdater
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public bool BlendWithOldTexture = false;
|
||||
public string BodyData;
|
||||
public string ContentType;
|
||||
@@ -302,8 +306,7 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Console.WriteLine(
|
||||
"[DYNAMICTEXTUREMODULE]: OpenJpeg Encode Failed. Empty byte data returned!");
|
||||
m_log.Error("[DYNAMICTEXTUREMODULE]: OpenJpeg Encode Failed. Empty byte data returned!");
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
@@ -34,11 +34,15 @@ using OpenMetaverse;
|
||||
using OpenMetaverse.Imaging;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using log4net;
|
||||
using System.Reflection;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
|
||||
{
|
||||
public class LoadImageURLModule : IRegionModule, IDynamicTextureRender
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private string m_name = "LoadImageURL";
|
||||
private Scene m_scene;
|
||||
private IDynamicTextureManager m_textureManager;
|
||||
@@ -203,8 +207,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Console.WriteLine(
|
||||
"[LOADIMAGEURLMODULE]: OpenJpeg Encode Failed. Empty byte data returned!");
|
||||
m_log.Error("[LOADIMAGEURLMODULE]: OpenJpeg Encode Failed. Empty byte data returned!");
|
||||
}
|
||||
|
||||
m_textureManager.ReturnData(state.RequestID, imageJ2000);
|
||||
|
||||
@@ -36,6 +36,8 @@ using OpenMetaverse;
|
||||
using OpenMetaverse.Imaging;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using log4net;
|
||||
using System.Reflection;
|
||||
|
||||
//using Cairo;
|
||||
|
||||
@@ -43,6 +45,8 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
||||
{
|
||||
public class VectorRenderModule : IRegionModule, IDynamicTextureRender
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private string m_name = "VectorRenderModule";
|
||||
private Scene m_scene;
|
||||
private IDynamicTextureManager m_textureManager;
|
||||
@@ -317,7 +321,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Console.WriteLine(
|
||||
m_log.Error(
|
||||
"[VECTORRENDERMODULE]: OpenJpeg Encode Failed. Empty byte data returned!");
|
||||
}
|
||||
m_textureManager.ReturnData(id, imageJ2000);
|
||||
@@ -333,7 +337,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender
|
||||
catch (Exception)
|
||||
{
|
||||
//Ckrinke: Add a WriteLine to remove the warning about 'e' defined but not used
|
||||
// Console.WriteLine("Problem with Draw. Please verify parameters." + e.ToString());
|
||||
// m_log.Debug("Problem with Draw. Please verify parameters." + e.ToString());
|
||||
parsed = -1;
|
||||
}
|
||||
|
||||
|
||||
@@ -333,7 +333,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("UNABLE TO REMOVE COMPLETED REQUEST");
|
||||
m_log.Error("UNABLE TO REMOVE COMPLETED REQUEST");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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