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:
@@ -31,6 +31,8 @@ using System.Collections.Generic;
|
||||
using OpenSim.Framework;
|
||||
using OpenMetaverse;
|
||||
using OpenMetaverse.StructuredData;
|
||||
using log4net;
|
||||
using System.Reflection;
|
||||
|
||||
namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
@@ -240,6 +242,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public class AgentData : IAgentData
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private UUID m_id;
|
||||
public UUID AgentID
|
||||
{
|
||||
@@ -496,10 +499,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public void Dump()
|
||||
{
|
||||
System.Console.WriteLine("------------ AgentData ------------");
|
||||
System.Console.WriteLine("UUID: " + AgentID);
|
||||
System.Console.WriteLine("Region: " + RegionHandle);
|
||||
System.Console.WriteLine("Position: " + Position);
|
||||
m_log.Info("------------ AgentData ------------");
|
||||
m_log.Info("UUID: " + AgentID);
|
||||
m_log.Info("Region: " + RegionHandle);
|
||||
m_log.Info("Position: " + Position);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
protected EntityBase(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
//System.Console.WriteLine("EntityBase Deserialize BGN");
|
||||
//m_log.Debug("EntityBase Deserialize BGN");
|
||||
|
||||
if (info == null)
|
||||
{
|
||||
@@ -187,7 +187,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
m_localId = (uint)info.GetValue("m_localId", typeof(uint));
|
||||
|
||||
//System.Console.WriteLine("EntityBase Deserialize END");
|
||||
//m_log.Debug("EntityBase Deserialize END");
|
||||
}
|
||||
|
||||
[SecurityPermission(SecurityAction.LinkDemand,
|
||||
|
||||
@@ -126,7 +126,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
|
||||
{
|
||||
isHomeUser = HGNetworkServersInfo.Singleton.IsLocalUser(uinfo.UserProfile);
|
||||
realHandle = m_hg.FindRegionHandle(regionHandle);
|
||||
Console.WriteLine("XXX ---- home user? " + isHomeUser + " --- hyperlink? " + isHyperLink + " --- real handle: " + realHandle.ToString());
|
||||
m_log.Debug("XXX ---- home user? " + isHomeUser + " --- hyperlink? " + isHyperLink + " --- real handle: " + realHandle.ToString());
|
||||
}
|
||||
///
|
||||
/// Hypergrid mod stop
|
||||
|
||||
@@ -358,7 +358,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
if (ownerID == CommsManager.UserProfileCacheService.LibraryRoot.Owner)
|
||||
{
|
||||
//Console.WriteLine("request info for library item");
|
||||
//m_log.Debug("request info for library item");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1538,7 +1538,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// </returns>
|
||||
public bool CrossPrimGroupIntoNewRegion(ulong newRegionHandle, SceneObjectGroup grp, bool silent)
|
||||
{
|
||||
//Console.WriteLine(" >>> CrossPrimGroupIntoNewRegion <<<");
|
||||
//m_log.Debug(" >>> CrossPrimGroupIntoNewRegion <<<");
|
||||
|
||||
bool successYN = false;
|
||||
grp.RootPart.UpdateFlag = 0;
|
||||
@@ -1695,7 +1695,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public bool IncomingCreateObject(ISceneObject sog)
|
||||
{
|
||||
//Console.WriteLine(" >>> IncomingCreateObject <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted);
|
||||
//m_log.Debug(" >>> IncomingCreateObject <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted);
|
||||
SceneObjectGroup newObject;
|
||||
try
|
||||
{
|
||||
@@ -2482,7 +2482,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public virtual bool IncomingChildAgentDataUpdate(AgentPosition cAgentData)
|
||||
{
|
||||
//Console.WriteLine(" XXX Scene IncomingChildAgentDataUpdate POSITION in " + RegionInfo.RegionName);
|
||||
//m_log.Debug(" XXX Scene IncomingChildAgentDataUpdate POSITION in " + RegionInfo.RegionName);
|
||||
ScenePresence childAgentUpdate = GetScenePresence(cAgentData.AgentID);
|
||||
if (childAgentUpdate != null)
|
||||
{
|
||||
@@ -2924,7 +2924,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// <param name="cmdparams"></param>
|
||||
public void HandleEditCommand(string[] cmdparams)
|
||||
{
|
||||
Console.WriteLine("Searching for Primitive: '" + cmdparams[2] + "'");
|
||||
m_log.Debug("Searching for Primitive: '" + cmdparams[2] + "'");
|
||||
|
||||
List<EntityBase> EntityList = GetEntities();
|
||||
|
||||
@@ -2941,7 +2941,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
new Vector3(Convert.ToSingle(cmdparams[3]), Convert.ToSingle(cmdparams[4]),
|
||||
Convert.ToSingle(cmdparams[5])));
|
||||
|
||||
Console.WriteLine("Edited scale of Primitive: " + part.Name);
|
||||
m_log.Debug("Edited scale of Primitive: " + part.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3414,7 +3414,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public void TerrainUnAcked(IClientAPI client, int patchX, int patchY)
|
||||
{
|
||||
//Console.WriteLine("Terrain packet unacked, resending patch: " + patchX + " , " + patchY);
|
||||
//m_log.Debug("Terrain packet unacked, resending patch: " + patchX + " , " + patchY);
|
||||
client.SendLayerData(patchX, patchY, Heightmap.GetFloatsSerialised());
|
||||
}
|
||||
|
||||
|
||||
@@ -372,7 +372,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
Dictionary<ulong, string> seeds
|
||||
= new Dictionary<ulong, string>(avatar.Scene.CapsModule.GetChildrenSeeds(avatar.UUID));
|
||||
|
||||
//Console.WriteLine(" !!! No. of seeds: " + seeds.Count);
|
||||
//m_log.Debug(" !!! No. of seeds: " + seeds.Count);
|
||||
if (!seeds.ContainsKey(avatar.Scene.RegionInfo.RegionHandle))
|
||||
seeds.Add(avatar.Scene.RegionInfo.RegionHandle, avatar.ControllingClient.RequestClientInfo().CapsPath);
|
||||
|
||||
@@ -954,7 +954,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
int count = 20;
|
||||
while (m_agentsInTransit.Contains(id) && count-- > 0)
|
||||
{
|
||||
//Console.WriteLine(" >>> Waiting... " + count);
|
||||
//m_log.Debug(" >>> Waiting... " + count);
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
|
||||
@@ -966,7 +966,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public bool ReleaseAgent(UUID id)
|
||||
{
|
||||
//Console.WriteLine(" >>> ReleaseAgent called <<< ");
|
||||
//m_log.Debug(" >>> ReleaseAgent called <<< ");
|
||||
return ResetFromTransit(id);
|
||||
}
|
||||
|
||||
@@ -1104,7 +1104,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
//AgentCircuitData circuitdata = m_controllingClient.RequestClientInfo();
|
||||
agent.ControllingClient.RequestClientInfo();
|
||||
|
||||
//Console.WriteLine("BEFORE CROSS");
|
||||
//m_log.Debug("BEFORE CROSS");
|
||||
//Scene.DumpChildrenSeeds(UUID);
|
||||
//DumpKnownRegions();
|
||||
string agentcaps;
|
||||
@@ -1162,7 +1162,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
//Console.WriteLine("AFTER CROSS");
|
||||
//m_log.Debug("AFTER CROSS");
|
||||
//Scene.DumpChildrenSeeds(UUID);
|
||||
//DumpKnownRegions();
|
||||
return agent;
|
||||
@@ -1252,14 +1252,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
// private void Dump(string msg, List<ulong> handles)
|
||||
// {
|
||||
// Console.WriteLine("-------------- HANDLE DUMP ({0}) ---------", msg);
|
||||
// m_log.Info"-------------- HANDLE DUMP ({0}) ---------", msg);
|
||||
// foreach (ulong handle in handles)
|
||||
// {
|
||||
// uint x, y;
|
||||
// Utils.LongToUInts(handle, out x, out y);
|
||||
// x = x / Constants.RegionSize;
|
||||
// y = y / Constants.RegionSize;
|
||||
// Console.WriteLine("({0}, {1})", x, y);
|
||||
// m_log.Info("({0}, {1})", x, y);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -322,7 +322,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public bool TrySetCurrentScene(UUID regionID)
|
||||
{
|
||||
Console.WriteLine("Searching for Region: '{0}'", regionID.ToString());
|
||||
m_log.Debug("Searching for Region: '" + regionID + "'");
|
||||
|
||||
foreach (Scene scene in m_localScenes)
|
||||
{
|
||||
|
||||
@@ -309,7 +309,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public string GetStateSnapshot()
|
||||
{
|
||||
//Console.WriteLine(" >>> GetStateSnapshot <<<");
|
||||
//m_log.Debug(" >>> GetStateSnapshot <<<");
|
||||
|
||||
List<string> assemblies = new List<string>();
|
||||
Dictionary<UUID, string> states = new Dictionary<UUID, string>();
|
||||
|
||||
@@ -526,7 +526,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("found unexpected element: " + reader.Name);
|
||||
m_log.Warn("found unexpected element: " + reader.Name);
|
||||
reader.Read();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -320,7 +320,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
protected SceneObjectPart(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
//System.Console.WriteLine("SceneObjectPart Deserialize BGN");
|
||||
//m_log.Debug("SceneObjectPart Deserialize BGN");
|
||||
m_TextureAnimation = new byte[0];
|
||||
m_particleSystem = new byte[0];
|
||||
if (info == null)
|
||||
@@ -333,7 +333,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
m_ids = (List<UUID>)info.GetValue("m_ids", typeof(List<UUID>));
|
||||
*/
|
||||
|
||||
//System.Console.WriteLine("SceneObjectPart Deserialize END");
|
||||
//m_log.Debug("SceneObjectPart Deserialize END");
|
||||
Rezzed = DateTime.Now;
|
||||
|
||||
m_inventory = new SceneObjectPartInventory(this);
|
||||
@@ -534,7 +534,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("[SCENEOBJECTPART]: GROUP POSITION. " + e.Message);
|
||||
m_log.Error("[SCENEOBJECTPART]: GROUP POSITION. " + e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -619,7 +619,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine("[SCENEOBJECTPART]: ROTATIONOFFSET" + ex.Message);
|
||||
m_log.Error("[SCENEOBJECTPART]: ROTATIONOFFSET" + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1121,13 +1121,13 @@ if (m_shape != null) {
|
||||
// PrimFlags prevflag = Flags;
|
||||
if ((ObjectFlags & (uint) flag) == 0)
|
||||
{
|
||||
//Console.WriteLine("Adding flag: " + ((PrimFlags) flag).ToString());
|
||||
//m_log.Debug("Adding flag: " + ((PrimFlags) flag).ToString());
|
||||
_flags |= flag;
|
||||
|
||||
if (flag == PrimFlags.TemporaryOnRez)
|
||||
ResetExpire();
|
||||
}
|
||||
// System.Console.WriteLine("Aprev: " + prevflag.ToString() + " curr: " + Flags.ToString());
|
||||
// m_log.Debug("Aprev: " + prevflag.ToString() + " curr: " + Flags.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -2197,10 +2197,10 @@ if (m_shape != null) {
|
||||
// PrimFlags prevflag = Flags;
|
||||
if ((ObjectFlags & (uint) flag) != 0)
|
||||
{
|
||||
//Console.WriteLine("Removing flag: " + ((PrimFlags)flag).ToString());
|
||||
//m_log.Debug("Removing flag: " + ((PrimFlags)flag).ToString());
|
||||
_flags &= ~flag;
|
||||
}
|
||||
//System.Console.WriteLine("prev: " + prevflag.ToString() + " curr: " + Flags.ToString());
|
||||
//m_log.Debug("prev: " + prevflag.ToString() + " curr: " + Flags.ToString());
|
||||
//ScheduleFullUpdate();
|
||||
}
|
||||
|
||||
@@ -3552,7 +3552,7 @@ if (m_shape != null) {
|
||||
{
|
||||
RemFlag(PrimFlags.TemporaryOnRez);
|
||||
}
|
||||
// System.Console.WriteLine("Update: PHY:" + UsePhysics.ToString() + ", T:" + IsTemporary.ToString() + ", PHA:" + IsPhantom.ToString() + " S:" + CastsShadows.ToString());
|
||||
// m_log.Debug("Update: PHY:" + UsePhysics.ToString() + ", T:" + IsTemporary.ToString() + ", PHA:" + IsPhantom.ToString() + " S:" + CastsShadows.ToString());
|
||||
|
||||
ParentGroup.HasGroupChanged = true;
|
||||
ScheduleFullUpdate();
|
||||
|
||||
@@ -666,7 +666,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
fileData = Utils.StringToBytes(invString.BuildString);
|
||||
|
||||
//Console.WriteLine(Utils.BytesToString(fileData));
|
||||
//m_log.Debug(Utils.BytesToString(fileData));
|
||||
//m_log.Debug("[PRIM INVENTORY]: RequestInventoryFile fileData: " + Utils.BytesToString(fileData));
|
||||
|
||||
if (fileData.Length > 2)
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
// ~ScenePresence()
|
||||
// {
|
||||
// System.Console.WriteLine("[ScenePresence] Destructor called");
|
||||
// m_log.Debug("[ScenePresence] Destructor called");
|
||||
// }
|
||||
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
@@ -409,7 +409,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("[SCENEPRESENCE]: ABSOLUTE POSITION " + e.Message);
|
||||
m_log.Error("[SCENEPRESENCE]: ABSOLUTE POSITION " + e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -449,7 +449,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("[SCENEPRESENCE]: VELOCITY " + e.Message);
|
||||
m_log.Error("[SCENEPRESENCE]: VELOCITY " + e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -525,20 +525,20 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
DropOldNeighbours(old);
|
||||
Scene.CapsModule.SetChildrenSeed(UUID, seeds);
|
||||
KnownRegions = seeds;
|
||||
//Console.WriteLine(" ++++++++++AFTER+++++++++++++ ");
|
||||
//m_log.Debug(" ++++++++++AFTER+++++++++++++ ");
|
||||
//DumpKnownRegions();
|
||||
}
|
||||
|
||||
public void DumpKnownRegions()
|
||||
{
|
||||
Console.WriteLine("================ KnownRegions {0} ================", Scene.RegionInfo.RegionName);
|
||||
m_log.Info("================ KnownRegions "+Scene.RegionInfo.RegionName+" ================");
|
||||
foreach (KeyValuePair<ulong, string> kvp in KnownRegions)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -991,7 +991,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (m_knownChildRegions.ContainsKey(regionHandle))
|
||||
{
|
||||
m_knownChildRegions.Remove(regionHandle);
|
||||
//Console.WriteLine(" !!! removing known region {0} in {1}. Count = {2}", regionHandle, Scene.RegionInfo.RegionName, m_knownChildRegions.Count);
|
||||
//m_log.Debug(" !!! removing known region {0} in {1}. Count = {2}", regionHandle, Scene.RegionInfo.RegionName, m_knownChildRegions.Count);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1066,7 +1066,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
//if (m_isChildAgent)
|
||||
//{
|
||||
// // Console.WriteLine("DEBUG: HandleAgentUpdate: child agent");
|
||||
// // m_log.Debug("DEBUG: HandleAgentUpdate: child agent");
|
||||
// return;
|
||||
//}
|
||||
|
||||
@@ -1406,7 +1406,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
catch (Exception ex)
|
||||
{
|
||||
//Why did I get this error?
|
||||
Console.WriteLine("[SCENEPRESENCE]: DoMoveToPosition" + ex.ToString());
|
||||
m_log.Error("[SCENEPRESENCE]: DoMoveToPosition" + ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1923,7 +1923,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
if (m_isChildAgent)
|
||||
{
|
||||
Console.WriteLine("DEBUG: AddNewMovement: child agent");
|
||||
m_log.Debug("DEBUG: AddNewMovement: child agent");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2507,8 +2507,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
x = x / Constants.RegionSize;
|
||||
y = y / Constants.RegionSize;
|
||||
|
||||
//Console.WriteLine("---> x: " + x + "; newx:" + newRegionX + "; Abs:" + (int)Math.Abs((int)(x - newRegionX)));
|
||||
//Console.WriteLine("---> y: " + y + "; newy:" + newRegionY + "; Abs:" + (int)Math.Abs((int)(y - newRegionY)));
|
||||
//m_log.Debug("---> x: " + x + "; newx:" + newRegionX + "; Abs:" + (int)Math.Abs((int)(x - newRegionX)));
|
||||
//m_log.Debug("---> y: " + y + "; newy:" + newRegionY + "; Abs:" + (int)Math.Abs((int)(y - newRegionY)));
|
||||
if (Util.IsOutsideView(x, newRegionX, y, newRegionY))
|
||||
{
|
||||
byebyeRegions.Add(handle);
|
||||
@@ -2561,7 +2561,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
public void ChildAgentDataUpdate(AgentData cAgentData)
|
||||
{
|
||||
//Console.WriteLine(" >>> ChildAgentDataUpdate <<< " + Scene.RegionInfo.RegionName);
|
||||
//m_log.Debug(" >>> ChildAgentDataUpdate <<< " + Scene.RegionInfo.RegionName);
|
||||
if (!IsChildAgent)
|
||||
return;
|
||||
|
||||
@@ -2577,7 +2577,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (!IsChildAgent)
|
||||
return;
|
||||
|
||||
//Console.WriteLine(" >>> ChildAgentPositionUpdate <<< " + rRegionX + "-" + rRegionY);
|
||||
//m_log.Debug(" >>> ChildAgentPositionUpdate <<< " + rRegionX + "-" + rRegionY);
|
||||
int shiftx = ((int)rRegionX - (int)tRegionX) * (int)Constants.RegionSize;
|
||||
int shifty = ((int)rRegionY - (int)tRegionY) * (int)Constants.RegionSize;
|
||||
|
||||
@@ -2816,7 +2816,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
protected ScenePartUpdate(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
//System.Console.WriteLine("ScenePartUpdate Deserialize BGN");
|
||||
//m_log.Debug("ScenePartUpdate Deserialize BGN");
|
||||
|
||||
if (info == null)
|
||||
{
|
||||
@@ -2827,7 +2827,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
LastFullUpdateTime = (uint)info.GetValue("LastFullUpdateTime", typeof(uint));
|
||||
LastTerseUpdateTime = (uint)info.GetValue("LastTerseUpdateTime", typeof(uint));
|
||||
|
||||
//System.Console.WriteLine("ScenePartUpdate Deserialize END");
|
||||
//m_log.Debug("ScenePartUpdate Deserialize END");
|
||||
}
|
||||
|
||||
[SecurityPermission(SecurityAction.LinkDemand,
|
||||
@@ -3084,7 +3084,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
protected ScenePresence(SerializationInfo info, StreamingContext context)
|
||||
: base (info, context)
|
||||
{
|
||||
//System.Console.WriteLine("ScenePresence Deserialize BGN");
|
||||
//m_log.Debug("ScenePresence Deserialize BGN");
|
||||
|
||||
if (info == null)
|
||||
{
|
||||
@@ -3239,7 +3239,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
m_state = (byte)info.GetValue("m_state", typeof(byte));
|
||||
|
||||
//System.Console.WriteLine("ScenePresence Deserialize END");
|
||||
//m_log.Debug("ScenePresence Deserialize END");
|
||||
}
|
||||
|
||||
[SecurityPermission(SecurityAction.LinkDemand,
|
||||
|
||||
@@ -27,11 +27,15 @@
|
||||
|
||||
using System;
|
||||
using OpenMetaverse;
|
||||
using log4net;
|
||||
using System.Reflection;
|
||||
|
||||
namespace OpenSim.Region.Framework.Scenes.Scripting
|
||||
{
|
||||
public class NullScriptHost : IScriptHost
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private Vector3 m_pos = new Vector3(128, 128, 30);
|
||||
|
||||
public string Name
|
||||
@@ -80,7 +84,7 @@ namespace OpenSim.Region.Framework.Scenes.Scripting
|
||||
|
||||
public void SetText(string text, Vector3 color, double alpha)
|
||||
{
|
||||
Console.WriteLine("Tried to SetText [{0}] on NullScriptHost", text);
|
||||
m_log.Warn("Tried to SetText "+text+" on NullScriptHost");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,10 +87,10 @@ namespace OpenSim.Region.Framework.Scenes.Scripting
|
||||
//}
|
||||
|
||||
|
||||
//Console.WriteLine("Loading: " + FileName);
|
||||
//m_log.Debug("Loading: " + FileName);
|
||||
//foreach (Type _t in a.GetTypes())
|
||||
//{
|
||||
// Console.WriteLine("Type: " + _t.ToString());
|
||||
// m_log.Debug("Type: " + _t.ToString());
|
||||
//}
|
||||
|
||||
Type t;
|
||||
|
||||
@@ -144,7 +144,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
SimStatsPacket.RegionBlock rb = new SimStatsPacket.RegionBlock();
|
||||
|
||||
// Know what's not thread safe in Mono... modifying timers.
|
||||
// System.Console.WriteLine("Firing Stats Heart Beat");
|
||||
// m_log.Debug("Firing Stats Heart Beat");
|
||||
lock (m_report)
|
||||
{
|
||||
uint regionFlags = 0;
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
|
||||
SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene);
|
||||
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
|
||||
|
||||
//System.Console.WriteLine("retrievedPart : {0}", retrievedPart);
|
||||
//m_log.Debug("retrievedPart : {0}", retrievedPart);
|
||||
// If the parts have the same UUID then we will consider them as one and the same
|
||||
Assert.That(retrievedPart.UUID, Is.EqualTo(part.UUID));
|
||||
}
|
||||
@@ -136,4 +136,4 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
|
||||
Assert.That(retrievedPart, Is.Null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,8 @@ using OpenSim.Region.Communications.Local;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Tests.Common.Mock;
|
||||
using OpenSim.Tests.Common.Setup;
|
||||
using log4net;
|
||||
using System.Reflection;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.Scenes.Tests
|
||||
{
|
||||
@@ -45,6 +47,8 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
|
||||
[TestFixture]
|
||||
public class SceneObjectLinkingTests
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
[Test]
|
||||
public void TestLinkDelink2SceneObjects()
|
||||
{
|
||||
@@ -80,10 +84,10 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
|
||||
|
||||
if (debugtest)
|
||||
{
|
||||
System.Console.WriteLine("parts: {0}", grp1.Children.Count);
|
||||
System.Console.WriteLine("Group1: Pos:{0}, Rot:{1}", grp1.AbsolutePosition, grp1.Rotation);
|
||||
System.Console.WriteLine("Group1: Prim1: OffsetPosition:{0}, OffsetRotation:{1}", part1.OffsetPosition, part1.RotationOffset);
|
||||
System.Console.WriteLine("Group1: Prim2: OffsetPosition:{0}, OffsetRotation:{1}", part2.OffsetPosition, part2.RotationOffset);
|
||||
m_log.Debug("parts: " + grp1.Children.Count);
|
||||
m_log.Debug("Group1: Pos:"+grp1.AbsolutePosition+", Rot:"+grp1.Rotation);
|
||||
m_log.Debug("Group1: Prim1: OffsetPosition:"+ part1.OffsetPosition+", OffsetRotation:"+part1.RotationOffset);
|
||||
m_log.Debug("Group1: Prim2: OffsetPosition:"+part2.OffsetPosition+", OffsetRotation:"+part2.RotationOffset);
|
||||
}
|
||||
|
||||
// root part should have no offset position or rotation
|
||||
@@ -101,13 +105,13 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
|
||||
Vector3 rotEuler1 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG);
|
||||
|
||||
if (debugtest)
|
||||
System.Console.WriteLine(rotEuler1);
|
||||
m_log.Debug(rotEuler1);
|
||||
|
||||
part2.RotationOffset.GetEulerAngles(out roll, out pitch, out yaw);
|
||||
Vector3 rotEuler2 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG);
|
||||
|
||||
if (debugtest)
|
||||
System.Console.WriteLine(rotEuler2);
|
||||
m_log.Debug(rotEuler2);
|
||||
|
||||
Assert.That(rotEuler2.ApproxEquals(new Vector3(-180, 0, 0), 0.001f) || rotEuler2.ApproxEquals(new Vector3(180, 0, 0), 0.001f));
|
||||
|
||||
@@ -115,7 +119,7 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
|
||||
grp1.DelinkFromGroup(part2.LocalId);
|
||||
|
||||
if (debugtest)
|
||||
System.Console.WriteLine("Group2: Prim2: OffsetPosition:{0}, OffsetRotation:{1}", part2.AbsolutePosition, part2.RotationOffset);
|
||||
m_log.Debug("Group2: Prim2: OffsetPosition:" + part2.AbsolutePosition + ", OffsetRotation:" + part2.RotationOffset);
|
||||
|
||||
Assert.That(grp1.Children.Count, Is.EqualTo(1), "Group 1 still contained part2 after delink.");
|
||||
Assert.That(part2.AbsolutePosition == Vector3.Zero);
|
||||
@@ -175,16 +179,16 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
|
||||
|
||||
if (debugtest)
|
||||
{
|
||||
System.Console.WriteLine("--------After Link-------");
|
||||
System.Console.WriteLine("Group1: parts: {0}", grp1.Children.Count);
|
||||
System.Console.WriteLine("Group1: Pos:{0}, Rot:{1}", grp1.AbsolutePosition, grp1.Rotation);
|
||||
System.Console.WriteLine("Group1: Prim1: OffsetPosition:{0}, OffsetRotation:{1}", part1.OffsetPosition, part1.RotationOffset);
|
||||
System.Console.WriteLine("Group1: Prim2: OffsetPosition:{0}, OffsetRotation:{1}", part2.OffsetPosition, part2.RotationOffset);
|
||||
m_log.Debug("--------After Link-------");
|
||||
m_log.Debug("Group1: parts:" + grp1.Children.Count);
|
||||
m_log.Debug("Group1: Pos:"+grp1.AbsolutePosition+", Rot:"+grp1.Rotation);
|
||||
m_log.Debug("Group1: Prim1: OffsetPosition:" + part1.OffsetPosition + ", OffsetRotation:" + part1.RotationOffset);
|
||||
m_log.Debug("Group1: Prim2: OffsetPosition:"+part2.OffsetPosition+", OffsetRotation:"+ part2.RotationOffset);
|
||||
|
||||
System.Console.WriteLine("Group3: parts: {0}", grp3.Children.Count);
|
||||
System.Console.WriteLine("Group3: Pos:{0}, Rot:{1}", grp3.AbsolutePosition, grp3.Rotation);
|
||||
System.Console.WriteLine("Group3: Prim1: OffsetPosition:{0}, OffsetRotation:{1}", part3.OffsetPosition, part3.RotationOffset);
|
||||
System.Console.WriteLine("Group3: Prim2: OffsetPosition:{0}, OffsetRotation:{1}", part4.OffsetPosition, part4.RotationOffset);
|
||||
m_log.Debug("Group3: parts:"+grp3.Children.Count);
|
||||
m_log.Debug("Group3: Pos:"+grp3.AbsolutePosition+", Rot:"+grp3.Rotation);
|
||||
m_log.Debug("Group3: Prim1: OffsetPosition:"+part3.OffsetPosition+", OffsetRotation:"+part3.RotationOffset);
|
||||
m_log.Debug("Group3: Prim2: OffsetPosition:"+part4.OffsetPosition+", OffsetRotation:"+part4.RotationOffset);
|
||||
}
|
||||
|
||||
// Required for linking
|
||||
@@ -206,13 +210,13 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
|
||||
Vector3 rotEuler1 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG);
|
||||
|
||||
if (debugtest)
|
||||
System.Console.WriteLine(rotEuler1);
|
||||
m_log.Debug(rotEuler1);
|
||||
|
||||
part2.RotationOffset.GetEulerAngles(out roll, out pitch, out yaw);
|
||||
Vector3 rotEuler2 = new Vector3(roll * Utils.RAD_TO_DEG, pitch * Utils.RAD_TO_DEG, yaw * Utils.RAD_TO_DEG);
|
||||
|
||||
if (debugtest)
|
||||
System.Console.WriteLine(rotEuler2);
|
||||
m_log.Debug(rotEuler2);
|
||||
|
||||
Assert.That(rotEuler2.ApproxEquals(new Vector3(-180, 0, 0), 0.001f) || rotEuler2.ApproxEquals(new Vector3(180, 0, 0), 0.001f));
|
||||
|
||||
@@ -225,16 +229,16 @@ namespace OpenSim.Region.CoreModules.Scenes.Tests
|
||||
|
||||
if (debugtest)
|
||||
{
|
||||
System.Console.WriteLine("--------After De-Link-------");
|
||||
System.Console.WriteLine("Group1: parts: {0}", grp1.Children.Count);
|
||||
System.Console.WriteLine("Group1: Pos:{0}, Rot:{1}", grp1.AbsolutePosition, grp1.Rotation);
|
||||
System.Console.WriteLine("Group1: Prim1: OffsetPosition:{0}, OffsetRotation:{1}", part1.OffsetPosition, part1.RotationOffset);
|
||||
System.Console.WriteLine("NoGroup: Prim2: AbsolutePosition:{0}, OffsetRotation:{1}", part2.AbsolutePosition, part2.RotationOffset);
|
||||
m_log.Debug("--------After De-Link-------");
|
||||
m_log.Debug("Group1: parts:" + grp1.Children.Count);
|
||||
m_log.Debug("Group1: Pos:" + grp1.AbsolutePosition + ", Rot:" + grp1.Rotation);
|
||||
m_log.Debug("Group1: Prim1: OffsetPosition:" + part1.OffsetPosition + ", OffsetRotation:" + part1.RotationOffset);
|
||||
m_log.Debug("Group1: Prim2: OffsetPosition:" + part2.OffsetPosition + ", OffsetRotation:" + part2.RotationOffset);
|
||||
|
||||
System.Console.WriteLine("Group3: parts: {0}", grp3.Children.Count);
|
||||
System.Console.WriteLine("Group3: Pos:{0}, Rot:{1}", grp3.AbsolutePosition, grp3.Rotation);
|
||||
System.Console.WriteLine("Group3: Prim1: OffsetPosition:{0}, OffsetRotation:{1}", part3.OffsetPosition, part3.RotationOffset);
|
||||
System.Console.WriteLine("Group3: Prim2: OffsetPosition:{0}, OffsetRotation:{1}", part4.OffsetPosition, part4.RotationOffset);
|
||||
m_log.Debug("Group3: parts:" + grp3.Children.Count);
|
||||
m_log.Debug("Group3: Pos:" + grp3.AbsolutePosition + ", Rot:" + grp3.Rotation);
|
||||
m_log.Debug("Group3: Prim1: OffsetPosition:" + part3.OffsetPosition + ", OffsetRotation:" + part3.RotationOffset);
|
||||
m_log.Debug("Group3: Prim2: OffsetPosition:" + part4.OffsetPosition + ", OffsetRotation:" + part4.RotationOffset);
|
||||
}
|
||||
|
||||
Assert.That(part2.AbsolutePosition == Vector3.Zero);
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace OpenSim.Region.Framework.Scenes.Types
|
||||
m_leftY = leftY;
|
||||
m_width = width;
|
||||
m_height = height;
|
||||
// Console.WriteLine("creating quadtree node " + m_quadID);
|
||||
// m_log.Debug("creating quadtree node " + m_quadID);
|
||||
}
|
||||
|
||||
public void AddObject(SceneObjectGroup obj)
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace OpenSim.Region.Framework.Scenes.Types
|
||||
|
||||
protected UpdateQueue(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
//System.Console.WriteLine("UpdateQueue Deserialize BGN");
|
||||
//m_log.Debug("UpdateQueue Deserialize BGN");
|
||||
|
||||
if (info == null)
|
||||
{
|
||||
@@ -107,7 +107,7 @@ namespace OpenSim.Region.Framework.Scenes.Types
|
||||
m_ids.Add(new UUID(guid));
|
||||
}
|
||||
|
||||
//System.Console.WriteLine("UpdateQueue Deserialize END");
|
||||
//m_log.Debug("UpdateQueue Deserialize END");
|
||||
}
|
||||
|
||||
[SecurityPermission(SecurityAction.LinkDemand,
|
||||
|
||||
Reference in New Issue
Block a user