aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs13
1 files changed, 8 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 06da741..26fa6c0 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1095,7 +1095,7 @@ namespace OpenSim.Region.Framework.Scenes
1095 } 1095 }
1096 1096
1097 /// <summary> 1097 /// <summary>
1098 /// 1098 /// Do not call this directly. Call Scene.RequestTeleportLocation() instead.
1099 /// </summary> 1099 /// </summary>
1100 /// <param name="pos"></param> 1100 /// <param name="pos"></param>
1101 public void Teleport(Vector3 pos) 1101 public void Teleport(Vector3 pos)
@@ -1569,7 +1569,10 @@ namespace OpenSim.Region.Framework.Scenes
1569 } 1569 }
1570 else if (bAllowUpdateMoveToPosition) 1570 else if (bAllowUpdateMoveToPosition)
1571 { 1571 {
1572 if (HandleMoveToTargetUpdate(ref agent_control_v3)) 1572 // The UseClientAgentPosition is set if parcel ban is forcing the avatar to move to a
1573 // certain position. It's only check for tolerance on returning to that position is 0.2
1574 // rather than 1, at which point it removes its force target.
1575 if (HandleMoveToTargetUpdate(agentData.UseClientAgentPosition ? 0.2 : 1, ref agent_control_v3))
1573 update_movementflag = true; 1576 update_movementflag = true;
1574 } 1577 }
1575 } 1578 }
@@ -1631,7 +1634,7 @@ namespace OpenSim.Region.Framework.Scenes
1631 /// </remarks> 1634 /// </remarks>
1632 /// <param value="agent_control_v3">Cumulative agent movement that this method will update.</param> 1635 /// <param value="agent_control_v3">Cumulative agent movement that this method will update.</param>
1633 /// <returns>True if movement has been updated in some way. False otherwise.</returns> 1636 /// <returns>True if movement has been updated in some way. False otherwise.</returns>
1634 public bool HandleMoveToTargetUpdate(ref Vector3 agent_control_v3) 1637 public bool HandleMoveToTargetUpdate(double tolerance, ref Vector3 agent_control_v3)
1635 { 1638 {
1636// m_log.DebugFormat("[SCENE PRESENCE]: Called HandleMoveToTargetUpdate() for {0}", Name); 1639// m_log.DebugFormat("[SCENE PRESENCE]: Called HandleMoveToTargetUpdate() for {0}", Name);
1637 1640
@@ -1648,7 +1651,7 @@ namespace OpenSim.Region.Framework.Scenes
1648// Name, AbsolutePosition, MoveToPositionTarget, distanceToTarget); 1651// Name, AbsolutePosition, MoveToPositionTarget, distanceToTarget);
1649 1652
1650 // Check the error term of the current position in relation to the target position 1653 // Check the error term of the current position in relation to the target position
1651 if (distanceToTarget <= 1) 1654 if (distanceToTarget <= tolerance)
1652 { 1655 {
1653 // We are close enough to the target 1656 // We are close enough to the target
1654 AbsolutePosition = MoveToPositionTarget; 1657 AbsolutePosition = MoveToPositionTarget;
@@ -1824,7 +1827,7 @@ namespace OpenSim.Region.Framework.Scenes
1824// m_log.DebugFormat("[SCENE PRESENCE]: Body rot for {0} set to {1}", Name, Rotation); 1827// m_log.DebugFormat("[SCENE PRESENCE]: Body rot for {0} set to {1}", Name, Rotation);
1825 1828
1826 Vector3 agent_control_v3 = new Vector3(); 1829 Vector3 agent_control_v3 = new Vector3();
1827 HandleMoveToTargetUpdate(ref agent_control_v3); 1830 HandleMoveToTargetUpdate(1, ref agent_control_v3);
1828 AddNewMovement(agent_control_v3); 1831 AddNewMovement(agent_control_v3);
1829 } 1832 }
1830 1833