diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 5d643d1..307dec7 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -55,6 +55,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
55 | private bool m_oldColliding = true; | 55 | private bool m_oldColliding = true; |
56 | 56 | ||
57 | private bool m_isTyping = false; | 57 | private bool m_isTyping = false; |
58 | private bool m_setAlwaysRun = false; | ||
58 | 59 | ||
59 | private Quaternion m_bodyRot; | 60 | private Quaternion m_bodyRot; |
60 | private byte[] m_visualParams; | 61 | private byte[] m_visualParams; |
@@ -271,6 +272,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
271 | m_controllingClient.OnAgentUpdate += HandleAgentUpdate; | 272 | m_controllingClient.OnAgentUpdate += HandleAgentUpdate; |
272 | m_controllingClient.OnAgentRequestSit += HandleAgentRequestSit; | 273 | m_controllingClient.OnAgentRequestSit += HandleAgentRequestSit; |
273 | m_controllingClient.OnAgentSit += HandleAgentSit; | 274 | m_controllingClient.OnAgentSit += HandleAgentSit; |
275 | m_controllingClient.OnSetAlwaysRun += HandleSetAlwaysRun; | ||
274 | // ControllingClient.OnStartAnim += new StartAnim(this.SendAnimPack); | 276 | // ControllingClient.OnStartAnim += new StartAnim(this.SendAnimPack); |
275 | // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); | 277 | // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); |
276 | //ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); | 278 | //ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); |
@@ -637,7 +639,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
637 | SendAnimPack(Animations.AnimsLLUUID["SIT"], 1); | 639 | SendAnimPack(Animations.AnimsLLUUID["SIT"], 1); |
638 | SendFullUpdateToAllClients(); | 640 | SendFullUpdateToAllClients(); |
639 | } | 641 | } |
642 | public void HandleSetAlwaysRun(IClientAPI remoteClient, bool SetAlwaysRun) | ||
643 | { | ||
644 | m_setAlwaysRun = SetAlwaysRun; | ||
645 | if (PhysicsActor != null) | ||
646 | { | ||
647 | PhysicsActor.SetAlwaysRun = SetAlwaysRun; | ||
648 | } | ||
640 | 649 | ||
650 | } | ||
641 | protected void UpdateMovementAnimations(bool update_movementflag) | 651 | protected void UpdateMovementAnimations(bool update_movementflag) |
642 | { | 652 | { |
643 | if (update_movementflag) | 653 | if (update_movementflag) |
@@ -667,7 +677,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
667 | } | 677 | } |
668 | else | 678 | else |
669 | { | 679 | { |
670 | SendAnimPack(Animations.AnimsLLUUID["WALK"], 1); | 680 | if (!m_setAlwaysRun) |
681 | { | ||
682 | SendAnimPack(Animations.AnimsLLUUID["WALK"], 1); | ||
683 | } | ||
684 | else | ||
685 | { | ||
686 | SendAnimPack(Animations.AnimsLLUUID["RUN"], 1); | ||
687 | } | ||
671 | } | 688 | } |
672 | } | 689 | } |
673 | } | 690 | } |