aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-08-04 01:00:33 +0100
committerJustin Clark-Casey (justincc)2011-08-04 01:00:33 +0100
commit7f6f100c5a93791e8af29bafcfb93cfd289d5e8b (patch)
treef36b5dfbc1414fa2564429dd3f4eec6dc1479201 /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentextend npc move test to check a second movement (diff)
downloadopensim-SC_OLD-7f6f100c5a93791e8af29bafcfb93cfd289d5e8b.zip
opensim-SC_OLD-7f6f100c5a93791e8af29bafcfb93cfd289d5e8b.tar.gz
opensim-SC_OLD-7f6f100c5a93791e8af29bafcfb93cfd289d5e8b.tar.bz2
opensim-SC_OLD-7f6f100c5a93791e8af29bafcfb93cfd289d5e8b.tar.xz
When the NPC reaches within the SIGNIFICANT_CLIENT_MOVEMENT distance of the target, move it directly to the target.
This makes the movement exact. Regression test changed to check avatar reaches exact target. Also has the nice side effect of making NPC animations continue to work after the first movement (which wasn't working). However, avatar still pauses in mid-stride
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 54ef039..ba10423 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1575,6 +1575,7 @@ namespace OpenSim.Region.Framework.Scenes
1575 if (distanceToTarget <= 1) 1575 if (distanceToTarget <= 1)
1576 { 1576 {
1577 // We are close enough to the target 1577 // We are close enough to the target
1578 AbsolutePosition = MoveToPositionTarget;
1578 ResetMoveToTarget(); 1579 ResetMoveToTarget();
1579 updated = true; 1580 updated = true;
1580 } 1581 }
@@ -1713,7 +1714,7 @@ namespace OpenSim.Region.Framework.Scenes
1713 /// </summary> 1714 /// </summary>
1714 public void ResetMoveToTarget() 1715 public void ResetMoveToTarget()
1715 { 1716 {
1716// m_log.DebugFormat("[SCENE PRESENCE]: Resetting move to target for {0}", Name); 1717 m_log.DebugFormat("[SCENE PRESENCE]: Resetting move to target for {0}", Name);
1717 1718
1718 m_moveToPositionInProgress = false; 1719 m_moveToPositionInProgress = false;
1719 MoveToPositionTarget = Vector3.Zero; 1720 MoveToPositionTarget = Vector3.Zero;