From e61f42ad3a4a315d4eb56107bb6ead7092035bff Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Jan 2010 23:59:04 -0800 Subject: [PATCH] add a target position to agent updates to ScenePresence to support alternative client protocols --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 39a2c656cf..1c183f3310 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -1276,6 +1276,12 @@ namespace OpenSim.Region.Framework.Scenes if (m_allowMovement) { + if (agentData.UseClientAgentPosition) + { + m_moveToPositionInProgress = (agentData.ClientAgentPosition - AbsolutePosition).Length() > 0.2f; + m_moveToPositionTarget = agentData.ClientAgentPosition; + } + int i = 0; bool update_rotation = false; @@ -1382,7 +1388,7 @@ namespace OpenSim.Region.Framework.Scenes if (bAllowUpdateMoveToPosition && (m_moveToPositionInProgress && !m_autopilotMoving)) { //Check the error term of the current position in relation to the target position - if (Util.GetDistanceTo(AbsolutePosition, m_moveToPositionTarget) <= 1.5f) + if (Util.GetDistanceTo(AbsolutePosition, m_moveToPositionTarget) <= 0.5f) { // we are close enough to the target m_moveToPositionTarget = Vector3.Zero;