From a918c8df97572e49eea7155099feea6e4f207264 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 10 Dec 2010 03:46:16 +0000 Subject: fix the minimap sitting avatar location bug a sitting avatar should have it's offset position added to the scene object, not its absolute position --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 032c859..78e5da3 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -215,7 +215,7 @@ namespace OpenSim.Region.Framework.Scenes SceneObjectPart sop = m_parentScene.GetSceneObjectPart(sp.ParentID); if (sop != null) { - coarseLocations.Add(sop.AbsolutePosition + sp.AbsolutePosition); + coarseLocations.Add(sop.AbsolutePosition + sp.OffsetPosition); avatarUUIDs.Add(sp.UUID); } else -- cgit v1.1 From ccb4f958c0dbb2daad4249a6b97d1c0b008b6a47 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 10 Dec 2010 23:16:26 -0800 Subject: Another stab at mantis #5256 --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index a1c80e5..b4a7e02 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1217,6 +1217,8 @@ namespace OpenSim.Region.Framework.Scenes // return; //} + //m_log.DebugFormat("DEBUG: HandleAgentUpdate {0}", (AgentManager.ControlFlags)agentData.ControlFlags); + m_perfMonMS = Util.EnvironmentTickCount(); ++m_movementUpdateCount; @@ -1393,7 +1395,7 @@ namespace OpenSim.Region.Framework.Scenes try { agent_control_v3 += dirVectors[i]; - //m_log.DebugFormat("[Motion]: {0}, {1}",i, dirVectors[i]); + //m_log.DebugFormat("[Motion]: (0) {0}, {1}",i, dirVectors[i]); } catch (IndexOutOfRangeException) { @@ -1471,6 +1473,7 @@ namespace OpenSim.Region.Framework.Scenes Vector3 LocalVectorToTarget2D = new Vector3((float)(LocalVectorToTarget3D.X), (float)(LocalVectorToTarget3D.Y), 0f); LocalVectorToTarget2D.Normalize(); agent_control_v3 += LocalVectorToTarget2D; + //m_log.DebugFormat("[Motion]: (1) {0}, {1}", i, dirVectors[i]); // update avatar movement flags. the avatar coordinate system is as follows: // @@ -1554,11 +1557,11 @@ namespace OpenSim.Region.Framework.Scenes // If the agent update does move the avatar, then calculate the force ready for the velocity update, // which occurs later in the main scene loop - if (update_movementflag || (update_rotation && DCFlagKeyPressed)) + if ((update_movementflag) || (update_rotation && DCFlagKeyPressed)) { - // m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed)); - // m_log.DebugFormat( - // "In {0} adding velocity to {1} of {2}", m_scene.RegionInfo.RegionName, Name, agent_control_v3); + //m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed)); + //m_log.DebugFormat( + // "In {0} adding velocity to {1} of {2}", m_scene.RegionInfo.RegionName, Name, agent_control_v3); AddNewMovement(agent_control_v3, q); @@ -2327,6 +2330,9 @@ namespace OpenSim.Region.Framework.Scenes !m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE)) //Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE) { + //m_log.DebugFormat("XXX SendTerseUpdateToAllClients {0}-{1} {2}-{3} {4}-{5}", + // m_bodyRot, m_lastRotation, Velocity, m_lastVelocity, m_pos, m_lastPosition); + SendTerseUpdateToAllClients(); // Update the "last" values @@ -3226,7 +3232,7 @@ namespace OpenSim.Region.Framework.Scenes Vector3 force = m_forceToApply.Value; m_updateflag = true; -// movementvector = force; + // movementvector = force; Velocity = force; m_forceToApply = null; -- cgit v1.1 From c42876df6740cfe20e0a691357b56c31bdcecbf8 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 10 Dec 2010 23:32:50 -0800 Subject: Revert "Another stab at mantis #5256" This reverts commit ccb4f958c0dbb2daad4249a6b97d1c0b008b6a47. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index b4a7e02..a1c80e5 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1217,8 +1217,6 @@ namespace OpenSim.Region.Framework.Scenes // return; //} - //m_log.DebugFormat("DEBUG: HandleAgentUpdate {0}", (AgentManager.ControlFlags)agentData.ControlFlags); - m_perfMonMS = Util.EnvironmentTickCount(); ++m_movementUpdateCount; @@ -1395,7 +1393,7 @@ namespace OpenSim.Region.Framework.Scenes try { agent_control_v3 += dirVectors[i]; - //m_log.DebugFormat("[Motion]: (0) {0}, {1}",i, dirVectors[i]); + //m_log.DebugFormat("[Motion]: {0}, {1}",i, dirVectors[i]); } catch (IndexOutOfRangeException) { @@ -1473,7 +1471,6 @@ namespace OpenSim.Region.Framework.Scenes Vector3 LocalVectorToTarget2D = new Vector3((float)(LocalVectorToTarget3D.X), (float)(LocalVectorToTarget3D.Y), 0f); LocalVectorToTarget2D.Normalize(); agent_control_v3 += LocalVectorToTarget2D; - //m_log.DebugFormat("[Motion]: (1) {0}, {1}", i, dirVectors[i]); // update avatar movement flags. the avatar coordinate system is as follows: // @@ -1557,11 +1554,11 @@ namespace OpenSim.Region.Framework.Scenes // If the agent update does move the avatar, then calculate the force ready for the velocity update, // which occurs later in the main scene loop - if ((update_movementflag) || (update_rotation && DCFlagKeyPressed)) + if (update_movementflag || (update_rotation && DCFlagKeyPressed)) { - //m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed)); - //m_log.DebugFormat( - // "In {0} adding velocity to {1} of {2}", m_scene.RegionInfo.RegionName, Name, agent_control_v3); + // m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed)); + // m_log.DebugFormat( + // "In {0} adding velocity to {1} of {2}", m_scene.RegionInfo.RegionName, Name, agent_control_v3); AddNewMovement(agent_control_v3, q); @@ -2330,9 +2327,6 @@ namespace OpenSim.Region.Framework.Scenes !m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE)) //Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE) { - //m_log.DebugFormat("XXX SendTerseUpdateToAllClients {0}-{1} {2}-{3} {4}-{5}", - // m_bodyRot, m_lastRotation, Velocity, m_lastVelocity, m_pos, m_lastPosition); - SendTerseUpdateToAllClients(); // Update the "last" values @@ -3232,7 +3226,7 @@ namespace OpenSim.Region.Framework.Scenes Vector3 force = m_forceToApply.Value; m_updateflag = true; - // movementvector = force; +// movementvector = force; Velocity = force; m_forceToApply = null; -- cgit v1.1