diff options
author | Dan Lake | 2011-09-21 16:24:48 -0700 |
---|---|---|
committer | Dan Lake | 2011-09-21 16:24:48 -0700 |
commit | 28a482a7ee2cebab1aa720477af175d7e26d702e (patch) | |
tree | 863fb4b43a571da4d1d963b5a1383538e6391ec8 /OpenSim/Region/Framework/Scenes/ScenePresence.cs | |
parent | Commented out new debug statements in ScenePresence (diff) | |
parent | Reinstate option to land an npc when it reaches a target. (diff) | |
download | opensim-SC_OLD-28a482a7ee2cebab1aa720477af175d7e26d702e.zip opensim-SC_OLD-28a482a7ee2cebab1aa720477af175d7e26d702e.tar.gz opensim-SC_OLD-28a482a7ee2cebab1aa720477af175d7e26d702e.tar.bz2 opensim-SC_OLD-28a482a7ee2cebab1aa720477af175d7e26d702e.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index b1c2eea..5b02c3b 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -220,6 +220,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
220 | public bool MovingToTarget { get; private set; } | 220 | public bool MovingToTarget { get; private set; } |
221 | public Vector3 MoveToPositionTarget { get; private set; } | 221 | public Vector3 MoveToPositionTarget { get; private set; } |
222 | 222 | ||
223 | /// <summary> | ||
224 | /// Controls whether an avatar automatically moving to a target will land when it gets there (if flying). | ||
225 | /// </summary> | ||
226 | public bool LandAtTarget { get; private set; } | ||
227 | |||
223 | private bool m_followCamAuto; | 228 | private bool m_followCamAuto; |
224 | 229 | ||
225 | private int m_movementUpdateCount; | 230 | private int m_movementUpdateCount; |
@@ -1681,7 +1686,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1681 | /// This is to allow movement to targets that are known to be on an elevated platform with a continuous path | 1686 | /// This is to allow movement to targets that are known to be on an elevated platform with a continuous path |
1682 | /// from start to finish. | 1687 | /// from start to finish. |
1683 | /// </param> | 1688 | /// </param> |
1684 | public void MoveToTarget(Vector3 pos, bool noFly) | 1689 | /// <param name="landAtTarget"> |
1690 | /// If true and the avatar starts flying during the move then land at the target. | ||
1691 | /// </param> | ||
1692 | public void MoveToTarget(Vector3 pos, bool noFly, bool landAtTarget) | ||
1685 | { | 1693 | { |
1686 | m_log.DebugFormat( | 1694 | m_log.DebugFormat( |
1687 | "[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}", |
@@ -1720,6 +1728,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1720 | else if (pos.Z > terrainHeight) | 1728 | else if (pos.Z > terrainHeight) |
1721 | PhysicsActor.Flying = true; | 1729 | PhysicsActor.Flying = true; |
1722 | 1730 | ||
1731 | LandAtTarget = landAtTarget; | ||
1723 | MovingToTarget = true; | 1732 | MovingToTarget = true; |
1724 | MoveToPositionTarget = pos; | 1733 | MoveToPositionTarget = pos; |
1725 | 1734 | ||