aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs46
1 files changed, 11 insertions, 35 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 19b7f19..f482974 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -780,7 +780,7 @@ namespace OpenSim.Region.Framework.Scenes
780 m_controllingClient.OnStartAnim += HandleStartAnim; 780 m_controllingClient.OnStartAnim += HandleStartAnim;
781 m_controllingClient.OnStopAnim += HandleStopAnim; 781 m_controllingClient.OnStopAnim += HandleStopAnim;
782 m_controllingClient.OnForceReleaseControls += HandleForceReleaseControls; 782 m_controllingClient.OnForceReleaseControls += HandleForceReleaseControls;
783 m_controllingClient.OnAutoPilotGo += DoMoveToPosition; 783 m_controllingClient.OnAutoPilotGo += MoveToTarget;
784 784
785 // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); 785 // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange);
786 // ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); 786 // ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement);
@@ -1484,7 +1484,7 @@ namespace OpenSim.Region.Framework.Scenes
1484 i++; 1484 i++;
1485 } 1485 }
1486 1486
1487 if (DoMoveToPositionUpdate(ref agent_control_v3, bodyRotation, bResetMoveToPosition, bAllowUpdateMoveToPosition)) 1487 if (HandleMoveToPositionUpdate(ref agent_control_v3, bodyRotation, bResetMoveToPosition, bAllowUpdateMoveToPosition))
1488 update_movementflag = true; 1488 update_movementflag = true;
1489 } 1489 }
1490 1490
@@ -1547,7 +1547,7 @@ namespace OpenSim.Region.Framework.Scenes
1547 /// <param value="reset">If true, clear the move to position</param> 1547 /// <param value="reset">If true, clear the move to position</param>
1548 /// <param value="allowUpdate">If true, allow the update in principle.</param> 1548 /// <param value="allowUpdate">If true, allow the update in principle.</param>
1549 /// <returns>True if movement has been updated in some way. False otherwise.</returns> 1549 /// <returns>True if movement has been updated in some way. False otherwise.</returns>
1550 public bool DoMoveToPositionUpdate( 1550 public bool HandleMoveToPositionUpdate(
1551 ref Vector3 agent_control_v3, Quaternion bodyRotation, bool reset, bool allowUpdate) 1551 ref Vector3 agent_control_v3, Quaternion bodyRotation, bool reset, bool allowUpdate)
1552 { 1552 {
1553// m_log.DebugFormat("[SCENE PRESENCE]: Called DoMoveToPositionUpdate() for {0}", Name); 1553// m_log.DebugFormat("[SCENE PRESENCE]: Called DoMoveToPositionUpdate() for {0}", Name);
@@ -1557,7 +1557,7 @@ namespace OpenSim.Region.Framework.Scenes
1557 //Paupaw:Do Proper PID for Autopilot here 1557 //Paupaw:Do Proper PID for Autopilot here
1558 if (reset) 1558 if (reset)
1559 { 1559 {
1560 ResetMoveToPosition(); 1560 ResetMoveToTarget();
1561 updated = true; 1561 updated = true;
1562 } 1562 }
1563 1563
@@ -1646,6 +1646,8 @@ namespace OpenSim.Region.Framework.Scenes
1646 1646
1647 if (LocalVectorToTarget3D.Z > 0) //Up 1647 if (LocalVectorToTarget3D.Z > 0) //Up
1648 { 1648 {
1649 // Don't set these flags for up or down - doing so will make the avatar crouch or
1650 // keep trying to jump even if walking along level ground
1649 //m_movementflag += (byte)(uint)Dir_ControlFlags.DIR_CONTROL_FLAG_UP; 1651 //m_movementflag += (byte)(uint)Dir_ControlFlags.DIR_CONTROL_FLAG_UP;
1650 //AgentControlFlags 1652 //AgentControlFlags
1651 //AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_UP; 1653 //AgentControlFlags |= (uint)Dir_ControlFlags.DIR_CONTROL_FLAG_UP;
@@ -1671,37 +1673,11 @@ namespace OpenSim.Region.Framework.Scenes
1671 return updated; 1673 return updated;
1672 } 1674 }
1673 1675
1674// public void DoAutoPilot(uint not_used, Vector3 Pos, IClientAPI remote_client)
1675// {
1676// m_autopilotMoving = true;
1677// m_autoPilotTarget = Pos;
1678// m_sitAtAutoTarget = false;
1679// PrimitiveBaseShape proxy = PrimitiveBaseShape.Default;
1680// //proxy.PCode = (byte)PCode.ParticleSystem;
1681//
1682// proxyObjectGroup = new SceneObjectGroup(UUID, Pos, Rotation, proxy);
1683// proxyObjectGroup.AttachToScene(m_scene);
1684//
1685// // Commented out this code since it could never have executed, but might still be informative.
1686//// if (proxyObjectGroup != null)
1687//// {
1688// proxyObjectGroup.SendGroupFullUpdate();
1689// remote_client.SendSitResponse(proxyObjectGroup.UUID, Vector3.Zero, Quaternion.Identity, true, Vector3.Zero, Vector3.Zero, false);
1690// m_scene.DeleteSceneObject(proxyObjectGroup, false);
1691//// }
1692//// else
1693//// {
1694//// m_autopilotMoving = false;
1695//// m_autoPilotTarget = Vector3.Zero;
1696//// ControllingClient.SendAlertMessage("Autopilot cancelled");
1697//// }
1698// }
1699
1700 /// <summary> 1676 /// <summary>
1701 /// Move this presence to the given position over time. 1677 /// Move to the given target over time.
1702 /// </summary> 1678 /// </summary>
1703 /// <param name="pos"></param> 1679 /// <param name="pos"></param>
1704 public void DoMoveToPosition(Vector3 pos) 1680 public void MoveToTarget(Vector3 pos)
1705 { 1681 {
1706// m_log.DebugFormat( 1682// m_log.DebugFormat(
1707// "[SCENE PRESENCE]: Avatar {0} received request to move to position {1} in {2}", 1683// "[SCENE PRESENCE]: Avatar {0} received request to move to position {1} in {2}",
@@ -1726,14 +1702,14 @@ namespace OpenSim.Region.Framework.Scenes
1726 MoveToPositionTarget = pos; 1702 MoveToPositionTarget = pos;
1727 1703
1728 Vector3 agent_control_v3 = new Vector3(); 1704 Vector3 agent_control_v3 = new Vector3();
1729 DoMoveToPositionUpdate(ref agent_control_v3, Rotation, false, true); 1705 HandleMoveToPositionUpdate(ref agent_control_v3, Rotation, false, true);
1730 AddNewMovement(agent_control_v3, Rotation); 1706 AddNewMovement(agent_control_v3, Rotation);
1731 } 1707 }
1732 1708
1733 /// <summary> 1709 /// <summary>
1734 /// Reset the move to position. 1710 /// Reset the move to target.
1735 /// </summary> 1711 /// </summary>
1736 public void ResetMoveToPosition() 1712 public void ResetMoveToTarget()
1737 { 1713 {
1738 MoveToPositionTarget = Vector3.Zero; 1714 MoveToPositionTarget = Vector3.Zero;
1739 m_moveToPositionInProgress = false; 1715 m_moveToPositionInProgress = false;