aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2012-02-23 23:05:04 +0000
committerMelanie2012-02-23 23:05:04 +0000
commitdaf58575f8a8a4610dab833d00b94811732c33cc (patch)
tree5d7d68e2667ec3ce36506849d711930078b2e2c7 /OpenSim
parentMerge branch 'master' into careminster (diff)
downloadopensim-SC_OLD-daf58575f8a8a4610dab833d00b94811732c33cc.zip
opensim-SC_OLD-daf58575f8a8a4610dab833d00b94811732c33cc.tar.gz
opensim-SC_OLD-daf58575f8a8a4610dab833d00b94811732c33cc.tar.bz2
opensim-SC_OLD-daf58575f8a8a4610dab833d00b94811732c33cc.tar.xz
Partially apply the core banlines fix
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs13
2 files changed, 9 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index b7162da..fcbed9f 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -5472,7 +5472,7 @@ Environment.Exit(1);
5472// presence.Name, presence.AbsolutePosition, presence.MoveToPositionTarget); 5472// presence.Name, presence.AbsolutePosition, presence.MoveToPositionTarget);
5473 5473
5474 Vector3 agent_control_v3 = new Vector3(); 5474 Vector3 agent_control_v3 = new Vector3();
5475 presence.HandleMoveToTargetUpdate(ref agent_control_v3); 5475 presence.HandleMoveToTargetUpdate(1, ref agent_control_v3);
5476 presence.AddNewMovement(agent_control_v3); 5476 presence.AddNewMovement(agent_control_v3);
5477 } 5477 }
5478 } 5478 }
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