aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorunknown2010-01-21 23:59:04 -0800
committerunknown2010-01-21 23:59:04 -0800
commite61f42ad3a4a315d4eb56107bb6ead7092035bff (patch)
treeb42c6b8f4db812160455345b1df64a615163eb71 /OpenSim/Region/Framework/Scenes/ScenePresence.cs
parentFixes llSetDamage. Patch from Revolution (diff)
downloadopensim-SC-e61f42ad3a4a315d4eb56107bb6ead7092035bff.zip
opensim-SC-e61f42ad3a4a315d4eb56107bb6ead7092035bff.tar.gz
opensim-SC-e61f42ad3a4a315d4eb56107bb6ead7092035bff.tar.bz2
opensim-SC-e61f42ad3a4a315d4eb56107bb6ead7092035bff.tar.xz
add a target position to agent updates to ScenePresence to support alternative client protocols
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 39a2c65..1c183f3 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1276,6 +1276,12 @@ namespace OpenSim.Region.Framework.Scenes
1276 1276
1277 if (m_allowMovement) 1277 if (m_allowMovement)
1278 { 1278 {
1279 if (agentData.UseClientAgentPosition)
1280 {
1281 m_moveToPositionInProgress = (agentData.ClientAgentPosition - AbsolutePosition).Length() > 0.2f;
1282 m_moveToPositionTarget = agentData.ClientAgentPosition;
1283 }
1284
1279 int i = 0; 1285 int i = 0;
1280 1286
1281 bool update_rotation = false; 1287 bool update_rotation = false;
@@ -1382,7 +1388,7 @@ namespace OpenSim.Region.Framework.Scenes
1382 if (bAllowUpdateMoveToPosition && (m_moveToPositionInProgress && !m_autopilotMoving)) 1388 if (bAllowUpdateMoveToPosition && (m_moveToPositionInProgress && !m_autopilotMoving))
1383 { 1389 {
1384 //Check the error term of the current position in relation to the target position 1390 //Check the error term of the current position in relation to the target position
1385 if (Util.GetDistanceTo(AbsolutePosition, m_moveToPositionTarget) <= 1.5f) 1391 if (Util.GetDistanceTo(AbsolutePosition, m_moveToPositionTarget) <= 0.5f)
1386 { 1392 {
1387 // we are close enough to the target 1393 // we are close enough to the target
1388 m_moveToPositionTarget = Vector3.Zero; 1394 m_moveToPositionTarget = Vector3.Zero;