diff options
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/INPCModule.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 9 |
3 files changed, 13 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/INPCModule.cs b/OpenSim/Region/Framework/Interfaces/INPCModule.cs index 763d2dc..06296c9 100644 --- a/OpenSim/Region/Framework/Interfaces/INPCModule.cs +++ b/OpenSim/Region/Framework/Interfaces/INPCModule.cs | |||
@@ -67,8 +67,12 @@ namespace OpenSim.Region.Framework.Interfaces | |||
67 | /// <param name="agentID">The UUID of the NPC</param> | 67 | /// <param name="agentID">The UUID of the NPC</param> |
68 | /// <param name="scene"></param> | 68 | /// <param name="scene"></param> |
69 | /// <param name="pos"></param> | 69 | /// <param name="pos"></param> |
70 | /// <param name="noFly"> | ||
71 | /// If true, then the avatar will attempt to walk to the location even if it's up in the air. | ||
72 | /// This is to allow walking on prims. | ||
73 | /// </param> | ||
70 | /// <returns>True if the operation succeeded, false if there was no such agent or the agent was not an NPC</returns> | 74 | /// <returns>True if the operation succeeded, false if there was no such agent or the agent was not an NPC</returns> |
71 | bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos); | 75 | bool MoveToTarget(UUID agentID, Scene scene, Vector3 pos, bool noFly); |
72 | 76 | ||
73 | /// <summary> | 77 | /// <summary> |
74 | /// Stop the NPC's current movement. | 78 | /// Stop the NPC's current movement. |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 3b6a458..fe96152 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.MoveToTarget(target); | 1653 | avatar.MoveToTarget(target, false); |
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 2db83eb..b8e4e93 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1684,7 +1684,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1684 | /// Move to the given target over time. | 1684 | /// Move to the given target over time. |
1685 | /// </summary> | 1685 | /// </summary> |
1686 | /// <param name="pos"></param> | 1686 | /// <param name="pos"></param> |
1687 | public void MoveToTarget(Vector3 pos) | 1687 | /// <param name="noFly"> |
1688 | /// If true, then don't allow the avatar to fly to the target, even if it's up in the air. | ||
1689 | /// This is to allow movement to targets that are known to be on an elevated platform with a continuous path | ||
1690 | /// from start to finish. | ||
1691 | /// </param> | ||
1692 | public void MoveToTarget(Vector3 pos, bool noFly) | ||
1688 | { | 1693 | { |
1689 | // m_log.DebugFormat( | 1694 | // m_log.DebugFormat( |
1690 | // "[SCENE PRESENCE]: Avatar {0} received request to move to position {1} in {2}", | 1695 | // "[SCENE PRESENCE]: Avatar {0} received request to move to position {1} in {2}", |
@@ -1718,7 +1723,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1718 | "[SCENE PRESENCE]: Avatar {0} set move to target {1} (terrain height {2}) in {3}", | 1723 | "[SCENE PRESENCE]: Avatar {0} set move to target {1} (terrain height {2}) in {3}", |
1719 | Name, pos, terrainHeight, m_scene.RegionInfo.RegionName); | 1724 | Name, pos, terrainHeight, m_scene.RegionInfo.RegionName); |
1720 | 1725 | ||
1721 | if (pos.Z > terrainHeight) | 1726 | if (!noFly && pos.Z > terrainHeight) |
1722 | PhysicsActor.Flying = true; | 1727 | PhysicsActor.Flying = true; |
1723 | 1728 | ||
1724 | MovingToTarget = true; | 1729 | MovingToTarget = true; |