diff options
Diffstat (limited to 'OpenSim')
4 files changed, 16 insertions, 40 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/tests/Remote.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/tests/Remote.cs index e2f327b..de2049f 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/tests/Remote.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/tests/Remote.cs | |||
@@ -169,7 +169,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory.Tests | |||
169 | float y = Convert.ToSingle(rdata.Parameters[PARM_MOVE_Y]); | 169 | float y = Convert.ToSingle(rdata.Parameters[PARM_MOVE_Y]); |
170 | float z = Convert.ToSingle(rdata.Parameters[PARM_MOVE_Z]); | 170 | float z = Convert.ToSingle(rdata.Parameters[PARM_MOVE_Z]); |
171 | Vector3 vector = new Vector3(x, y, z); | 171 | Vector3 vector = new Vector3(x, y, z); |
172 | presence.DoMoveToPosition(vector); | 172 | presence.MoveToTarget(vector); |
173 | } | 173 | } |
174 | catch (Exception e) | 174 | catch (Exception e) |
175 | { | 175 | { |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 1370afc..57baa99 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1650,7 +1650,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1650 | ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar); | 1650 | ScenePresence avatar = m_scene.GetScenePresence(rootpart.AttachedAvatar); |
1651 | if (avatar != null) | 1651 | if (avatar != null) |
1652 | { | 1652 | { |
1653 | avatar.DoMoveToPosition(target); | 1653 | avatar.MoveToTarget(target); |
1654 | } | 1654 | } |
1655 | } | 1655 | } |
1656 | else | 1656 | else |
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; |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index a78ad0c..1d88e43 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | |||
@@ -74,7 +74,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
74 | { | 74 | { |
75 | // m_log.DebugFormat("[NPC MODULE]: Stopping movement of npc {0} {1}", presence.Name, presence.UUID); | 75 | // m_log.DebugFormat("[NPC MODULE]: Stopping movement of npc {0} {1}", presence.Name, presence.UUID); |
76 | // We are close enough to the target for now | 76 | // We are close enough to the target for now |
77 | presence.ResetMoveToPosition(); | 77 | presence.ResetMoveToTarget(); |
78 | presence.Velocity = Vector3.Zero; | 78 | presence.Velocity = Vector3.Zero; |
79 | 79 | ||
80 | // FIXME: This doesn't work | 80 | // FIXME: This doesn't work |
@@ -86,7 +86,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
86 | else | 86 | else |
87 | { | 87 | { |
88 | Vector3 agent_control_v3 = new Vector3(); | 88 | Vector3 agent_control_v3 = new Vector3(); |
89 | presence.DoMoveToPositionUpdate(ref agent_control_v3, presence.Rotation, false, true); | 89 | presence.HandleMoveToPositionUpdate(ref agent_control_v3, presence.Rotation, false, true); |
90 | presence.AddNewMovement(agent_control_v3, presence.Rotation); | 90 | presence.AddNewMovement(agent_control_v3, presence.Rotation); |
91 | } | 91 | } |
92 | // | 92 | // |
@@ -189,7 +189,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
189 | m_log.DebugFormat( | 189 | m_log.DebugFormat( |
190 | "[NPC MODULE]: Moving {0} to {1} in {2}", sp.Name, pos, scene.RegionInfo.RegionName); | 190 | "[NPC MODULE]: Moving {0} to {1} in {2}", sp.Name, pos, scene.RegionInfo.RegionName); |
191 | 191 | ||
192 | sp.DoMoveToPosition(pos); | 192 | sp.MoveToTarget(pos); |
193 | } | 193 | } |
194 | } | 194 | } |
195 | } | 195 | } |