aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs22
1 files changed, 16 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 6a3e79a..71dd2eb 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1430,6 +1430,7 @@ namespace OpenSim.Region.Framework.Scenes
1430 1430
1431 // The fact that m_movementflag is a byte needs to be fixed 1431 // The fact that m_movementflag is a byte needs to be fixed
1432 // it really should be a uint 1432 // it really should be a uint
1433 // A DIR_CONTROL_FLAG occurs when the user is trying to move in a particular direction.
1433 uint nudgehack = 250; 1434 uint nudgehack = 250;
1434 foreach (Dir_ControlFlags DCF in DIR_CONTROL_FLAGS) 1435 foreach (Dir_ControlFlags DCF in DIR_CONTROL_FLAGS)
1435 { 1436 {
@@ -1554,11 +1555,15 @@ namespace OpenSim.Region.Framework.Scenes
1554 1555
1555 bool updated = false; 1556 bool updated = false;
1556 1557
1557 //Paupaw:Do Proper PID for Autopilot here
1558 if (reset) 1558 if (reset)
1559 { 1559 {
1560 ResetMoveToTarget(); 1560 if (m_moveToPositionInProgress)
1561 updated = true; 1561 {
1562 ResetMoveToTarget();
1563 updated = true;
1564 }
1565
1566 return updated;
1562 } 1567 }
1563 1568
1564// m_log.DebugFormat( 1569// m_log.DebugFormat(
@@ -1576,8 +1581,7 @@ namespace OpenSim.Region.Framework.Scenes
1576 if (distanceToTarget <= 1) 1581 if (distanceToTarget <= 1)
1577 { 1582 {
1578 // We are close enough to the target 1583 // We are close enough to the target
1579 MoveToPositionTarget = Vector3.Zero; 1584 ResetMoveToTarget();
1580 m_moveToPositionInProgress = false;
1581 updated = true; 1585 updated = true;
1582 } 1586 }
1583 else 1587 else
@@ -1660,6 +1664,10 @@ namespace OpenSim.Region.Framework.Scenes
1660 updated = true; 1664 updated = true;
1661 } 1665 }
1662 1666
1667// m_log.DebugFormat(
1668// "[SCENE PRESENCE]: HandleMoveToTargetUpdate adding {0} to move vector {1} for {2}",
1669// LocalVectorToTarget3D, agent_control_v3, Name);
1670
1663 agent_control_v3 += LocalVectorToTarget3D; 1671 agent_control_v3 += LocalVectorToTarget3D;
1664 } 1672 }
1665 catch (Exception e) 1673 catch (Exception e)
@@ -1711,8 +1719,10 @@ namespace OpenSim.Region.Framework.Scenes
1711 /// </summary> 1719 /// </summary>
1712 public void ResetMoveToTarget() 1720 public void ResetMoveToTarget()
1713 { 1721 {
1714 MoveToPositionTarget = Vector3.Zero; 1722// m_log.DebugFormat("[SCENE PRESENCE]: Resetting move to target for {0}", Name);
1723
1715 m_moveToPositionInProgress = false; 1724 m_moveToPositionInProgress = false;
1725 MoveToPositionTarget = Vector3.Zero;
1716 } 1726 }
1717 1727
1718 private void CheckAtSitTarget() 1728 private void CheckAtSitTarget()