aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-02-23 22:56:42 +0000
committerJustin Clark-Casey (justincc)2012-02-23 22:56:42 +0000
commit90ea00a1098c918d5eb5a2be2793b109c6622a35 (patch)
tree9c7749d7addeaa21aae6467a1fd016fba3e13986 /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC_OLD-90ea00a1098c918d5eb5a2be2793b109c6622a35.zip
opensim-SC_OLD-90ea00a1098c918d5eb5a2be2793b109c6622a35.tar.gz
opensim-SC_OLD-90ea00a1098c918d5eb5a2be2793b109c6622a35.tar.bz2
opensim-SC_OLD-90ea00a1098c918d5eb5a2be2793b109c6622a35.tar.xz
Try to resolve some problems with viewers crashing after hitting parcel banlines or freezing on the banline.
This involves 1) On forcible teleport, call m_scene.RequestTeleportLocation() rather than ScenePresence.Teleport() - only EntityTransferModule now should call SP.Teleport() 2) When avatar is being forcibly moved due to banlines, use a 'stop movement' tolerance of 0.2 to requested position rather than 1 This prevents the avatar sometimes being stuck to banlines until they teleport somewhere else. This aims to fix some problems in http://opensimulator.org/mantis/view.php?id=5822
Diffstat (limited to '')
-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 9cfdf9f..40c8d06 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1048,7 +1048,7 @@ namespace OpenSim.Region.Framework.Scenes
1048 } 1048 }
1049 1049
1050 /// <summary> 1050 /// <summary>
1051 /// 1051 /// Do not call this directly. Call Scene.RequestTeleportLocation() instead.
1052 /// </summary> 1052 /// </summary>
1053 /// <param name="pos"></param> 1053 /// <param name="pos"></param>
1054 public void Teleport(Vector3 pos) 1054 public void Teleport(Vector3 pos)
@@ -1522,7 +1522,10 @@ namespace OpenSim.Region.Framework.Scenes
1522 } 1522 }
1523 else if (bAllowUpdateMoveToPosition) 1523 else if (bAllowUpdateMoveToPosition)
1524 { 1524 {
1525 if (HandleMoveToTargetUpdate(ref agent_control_v3)) 1525 // The UseClientAgentPosition is set if parcel ban is forcing the avatar to move to a
1526 // certain position. It's only check for tolerance on returning to that position is 0.2
1527 // rather than 1, at which point it removes its force target.
1528 if (HandleMoveToTargetUpdate(agentData.UseClientAgentPosition ? 0.2 : 1, ref agent_control_v3))
1526 update_movementflag = true; 1529 update_movementflag = true;
1527 } 1530 }
1528 } 1531 }
@@ -1584,7 +1587,7 @@ namespace OpenSim.Region.Framework.Scenes
1584 /// </remarks> 1587 /// </remarks>
1585 /// <param value="agent_control_v3">Cumulative agent movement that this method will update.</param> 1588 /// <param value="agent_control_v3">Cumulative agent movement that this method will update.</param>
1586 /// <returns>True if movement has been updated in some way. False otherwise.</returns> 1589 /// <returns>True if movement has been updated in some way. False otherwise.</returns>
1587 public bool HandleMoveToTargetUpdate(ref Vector3 agent_control_v3) 1590 public bool HandleMoveToTargetUpdate(double tolerance, ref Vector3 agent_control_v3)
1588 { 1591 {
1589// m_log.DebugFormat("[SCENE PRESENCE]: Called HandleMoveToTargetUpdate() for {0}", Name); 1592// m_log.DebugFormat("[SCENE PRESENCE]: Called HandleMoveToTargetUpdate() for {0}", Name);
1590 1593
@@ -1601,7 +1604,7 @@ namespace OpenSim.Region.Framework.Scenes
1601// Name, AbsolutePosition, MoveToPositionTarget, distanceToTarget); 1604// Name, AbsolutePosition, MoveToPositionTarget, distanceToTarget);
1602 1605
1603 // Check the error term of the current position in relation to the target position 1606 // Check the error term of the current position in relation to the target position
1604 if (distanceToTarget <= 1) 1607 if (distanceToTarget <= tolerance)
1605 { 1608 {
1606 // We are close enough to the target 1609 // We are close enough to the target
1607 AbsolutePosition = MoveToPositionTarget; 1610 AbsolutePosition = MoveToPositionTarget;
@@ -1777,7 +1780,7 @@ namespace OpenSim.Region.Framework.Scenes
1777// m_log.DebugFormat("[SCENE PRESENCE]: Body rot for {0} set to {1}", Name, Rotation); 1780// m_log.DebugFormat("[SCENE PRESENCE]: Body rot for {0} set to {1}", Name, Rotation);
1778 1781
1779 Vector3 agent_control_v3 = new Vector3(); 1782 Vector3 agent_control_v3 = new Vector3();
1780 HandleMoveToTargetUpdate(ref agent_control_v3); 1783 HandleMoveToTargetUpdate(1, ref agent_control_v3);
1781 AddNewMovement(agent_control_v3); 1784 AddNewMovement(agent_control_v3);
1782 } 1785 }
1783 1786