From 3bf699ad36081c9c53ee6845a5c85a3a1856b923 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 16 Dec 2011 08:59:33 -0800 Subject: [PATCH] No functional changes. Changed the prefix of that log message [CONNECTION BEGIN] to [SCENE] because that's where the message happens. Also changed the instantiation of a vector object to be done only once instead of every time we receive a position update. --- OpenSim/Region/Framework/Scenes/Scene.cs | 12 ++++++------ .../Region/Framework/Scenes/ScenePresence.cs | 18 +++++++++--------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 4ab6fe423f..b43b22736c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2512,7 +2512,7 @@ namespace OpenSim.Region.Framework.Scenes if (sp == null) { m_log.DebugFormat( - "[SCENE]: Adding new child scene presence {0} to scene {1}", client.Name, RegionInfo.RegionName); + "[SCENE]: Adding new child scene presence {0} to scene {1} at pos {2}", client.Name, RegionInfo.RegionName, client.StartPos); m_clientManager.Add(client); SubscribeToClientEvents(client); @@ -3249,9 +3249,9 @@ namespace OpenSim.Region.Framework.Scenes // Don't disable this log message - it's too helpful m_log.DebugFormat( - "[CONNECTION BEGIN]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, teleportflags {6})", + "[SCENE]: Region {0} told of incoming {1} agent {2} {3} {4} (circuit code {5}, teleportflags {6}, position {7})", RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname, - agent.AgentID, agent.circuitcode, teleportFlags); + agent.AgentID, agent.circuitcode, teleportFlags, agent.startpos); if (LoginsDisabled) { @@ -3294,7 +3294,7 @@ namespace OpenSim.Region.Framework.Scenes catch (Exception e) { m_log.ErrorFormat( - "[CONNECTION BEGIN]: Exception verifying presence {0}{1}", e.Message, e.StackTrace); + "[SCENE]: Exception verifying presence {0}{1}", e.Message, e.StackTrace); return false; } } @@ -3307,12 +3307,12 @@ namespace OpenSim.Region.Framework.Scenes catch (Exception e) { m_log.ErrorFormat( - "[CONNECTION BEGIN]: Exception authorizing user {0}{1}", e.Message, e.StackTrace); + "[SCENE]: Exception authorizing user {0}{1}", e.Message, e.StackTrace); return false; } m_log.InfoFormat( - "[CONNECTION BEGIN]: Region {0} authenticated and authorized incoming {1} agent {2} {3} {4} (circuit code {5})", + "[SCENE]: Region {0} authenticated and authorized incoming {1} agent {2} {3} {4} (circuit code {5})", RegionInfo.RegionName, (agent.child ? "child" : "root"), agent.firstname, agent.lastname, agent.AgentID, agent.circuitcode); diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index ac58dae649..800b7e0597 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -502,9 +502,9 @@ namespace OpenSim.Region.Framework.Scenes { m_pos = PhysicsActor.Position; -// m_log.DebugFormat( -// "[SCENE PRESENCE]: Set position {0} for {1} in {2} via getting AbsolutePosition!", -// m_pos, Name, Scene.RegionInfo.RegionName); + //m_log.DebugFormat( + // "[SCENE PRESENCE]: Set position {0} for {1} in {2} via getting AbsolutePosition!", + // m_pos, Name, Scene.RegionInfo.RegionName); } else { @@ -534,7 +534,6 @@ namespace OpenSim.Region.Framework.Scenes } } } - return m_pos; } set @@ -554,9 +553,9 @@ namespace OpenSim.Region.Framework.Scenes m_pos = value; ParentPosition = Vector3.Zero; -// m_log.DebugFormat( -// "[ENTITY BASE]: In {0} set AbsolutePosition of {1} to {2}", -// Scene.RegionInfo.RegionName, Name, m_pos); + //m_log.DebugFormat( + // "[ENTITY BASE]: In {0} set AbsolutePosition of {1} to {2}", + // Scene.RegionInfo.RegionName, Name, m_pos); } } @@ -3006,6 +3005,7 @@ namespace OpenSim.Region.Framework.Scenes CopyFrom(cAgentData); } + private static Vector3 marker = new Vector3(-1f, -1f, -1f); /// /// This updates important decision making data about a child agent /// The main purpose is to figure out what objects to send to a child agent that's in a neighboring region @@ -3026,8 +3026,8 @@ namespace OpenSim.Region.Framework.Scenes // region's draw distance. // DrawDistance = cAgentData.Far; DrawDistance = Scene.DefaultDrawDistance; - - if (cAgentData.Position != new Vector3(-1f, -1f, -1f)) // UGH!! + + if (cAgentData.Position != marker) // UGH!! m_pos = cAgentData.Position + offset; if (Vector3.Distance(AbsolutePosition, posLastSignificantMove) >= Scene.ChildReprioritizationDistance)