aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs13
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs2
2 files changed, 6 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index bb15a45..620db94 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1492,10 +1492,9 @@ namespace OpenSim.Region.Framework.Scenes
1492 ResetMoveToTarget(); 1492 ResetMoveToTarget();
1493 update_movementflag = true; 1493 update_movementflag = true;
1494 } 1494 }
1495 else 1495 else if (bAllowUpdateMoveToPosition)
1496 { 1496 {
1497 if (HandleMoveToTargetUpdate( 1497 if (HandleMoveToTargetUpdate(ref agent_control_v3, bodyRotation))
1498 ref agent_control_v3, bodyRotation, bAllowUpdateMoveToPosition))
1499 update_movementflag = true; 1498 update_movementflag = true;
1500 } 1499 }
1501 } 1500 }
@@ -1557,10 +1556,8 @@ namespace OpenSim.Region.Framework.Scenes
1557 /// </remarks> 1556 /// </remarks>
1558 /// <param value="agent_control_v3">Cumulative agent movement that this method will update.</param> 1557 /// <param value="agent_control_v3">Cumulative agent movement that this method will update.</param>
1559 /// <param value="bodyRotation">New body rotation of the avatar.</param> 1558 /// <param value="bodyRotation">New body rotation of the avatar.</param>
1560 /// <param value="allowUpdate">If true, allow the update in principle.</param>
1561 /// <returns>True if movement has been updated in some way. False otherwise.</returns> 1559 /// <returns>True if movement has been updated in some way. False otherwise.</returns>
1562 public bool HandleMoveToTargetUpdate( 1560 public bool HandleMoveToTargetUpdate(ref Vector3 agent_control_v3, Quaternion bodyRotation)
1563 ref Vector3 agent_control_v3, Quaternion bodyRotation, bool allowUpdate)
1564 { 1561 {
1565// m_log.DebugFormat("[SCENE PRESENCE]: Called HandleMoveToTargetUpdate() for {0}", Name); 1562// m_log.DebugFormat("[SCENE PRESENCE]: Called HandleMoveToTargetUpdate() for {0}", Name);
1566 1563
@@ -1570,7 +1567,7 @@ namespace OpenSim.Region.Framework.Scenes
1570// "[SCENE PRESENCE]: bAllowUpdateMoveToPosition {0}, m_moveToPositionInProgress {1}, m_autopilotMoving {2}", 1567// "[SCENE PRESENCE]: bAllowUpdateMoveToPosition {0}, m_moveToPositionInProgress {1}, m_autopilotMoving {2}",
1571// allowUpdate, m_moveToPositionInProgress, m_autopilotMoving); 1568// allowUpdate, m_moveToPositionInProgress, m_autopilotMoving);
1572 1569
1573 if (allowUpdate && (m_moveToPositionInProgress && !m_autopilotMoving)) 1570 if (!m_autopilotMoving)
1574 { 1571 {
1575 double distanceToTarget = Util.GetDistanceTo(AbsolutePosition, MoveToPositionTarget); 1572 double distanceToTarget = Util.GetDistanceTo(AbsolutePosition, MoveToPositionTarget);
1576// m_log.DebugFormat( 1573// m_log.DebugFormat(
@@ -1711,7 +1708,7 @@ namespace OpenSim.Region.Framework.Scenes
1711 MoveToPositionTarget = pos; 1708 MoveToPositionTarget = pos;
1712 1709
1713 Vector3 agent_control_v3 = new Vector3(); 1710 Vector3 agent_control_v3 = new Vector3();
1714 HandleMoveToTargetUpdate(ref agent_control_v3, Rotation, true); 1711 HandleMoveToTargetUpdate(ref agent_control_v3, Rotation);
1715 AddNewMovement(agent_control_v3, Rotation); 1712 AddNewMovement(agent_control_v3, Rotation);
1716 } 1713 }
1717 1714
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index fa60653..2215495 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -87,7 +87,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
87 else 87 else
88 { 88 {
89 Vector3 agent_control_v3 = new Vector3(); 89 Vector3 agent_control_v3 = new Vector3();
90 presence.HandleMoveToTargetUpdate(ref agent_control_v3, presence.Rotation, true); 90 presence.HandleMoveToTargetUpdate(ref agent_control_v3, presence.Rotation);
91 presence.AddNewMovement(agent_control_v3, presence.Rotation); 91 presence.AddNewMovement(agent_control_v3, presence.Rotation);
92 } 92 }
93// 93//