aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-08-11 01:56:42 +0100
committerJustin Clark-Casey (justincc)2011-08-11 01:56:42 +0100
commit4402851b086e7faf0d441d2ae0d5f6a3e1ea04b8 (patch)
treeff44ea86dfd8ba586ae4439728ef26341085691a /OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
parentIf SP.MoveToTarget has been called with a force walk, begin by landing the av... (diff)
downloadopensim-SC-4402851b086e7faf0d441d2ae0d5f6a3e1ea04b8.zip
opensim-SC-4402851b086e7faf0d441d2ae0d5f6a3e1ea04b8.tar.gz
opensim-SC-4402851b086e7faf0d441d2ae0d5f6a3e1ea04b8.tar.bz2
opensim-SC-4402851b086e7faf0d441d2ae0d5f6a3e1ea04b8.tar.xz
Get NPCs to revert to the correct 'resting' animation (e.g. stand or hover) after finishing their movement. This also fixes judder after an avatar has finished "go here"/autopilot movement in a viewer.
This meant reseting the SP.AgentControlFlags since the Animator uses these to determine the correct default animation.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
index 4ab818f..e07d8b4 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
@@ -77,6 +77,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation
77 if (m_scenePresence.IsChildAgent) 77 if (m_scenePresence.IsChildAgent)
78 return; 78 return;
79 79
80// m_log.DebugFormat("[SCENE PRESENCE ANIMATOR]: Adding animation {0} for {1}", animID, m_scenePresence.Name);
81
80 if (m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, objectID)) 82 if (m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, objectID))
81 SendAnimPack(); 83 SendAnimPack();
82 } 84 }
@@ -91,6 +93,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation
91 if (animID == UUID.Zero) 93 if (animID == UUID.Zero)
92 return; 94 return;
93 95
96// m_log.DebugFormat("[SCENE PRESENCE ANIMATOR]: Adding animation {0} {1} for {2}", animID, name, m_scenePresence.Name);
97
94 AddAnimation(animID, objectID); 98 AddAnimation(animID, objectID);
95 } 99 }
96 100
@@ -127,13 +131,15 @@ namespace OpenSim.Region.Framework.Scenes.Animation
127 /// </summary> 131 /// </summary>
128 public void TrySetMovementAnimation(string anim) 132 public void TrySetMovementAnimation(string anim)
129 { 133 {
130 //m_log.DebugFormat("Updating movement animation to {0}", anim);
131
132 if (!m_scenePresence.IsChildAgent) 134 if (!m_scenePresence.IsChildAgent)
133 { 135 {
134 if (m_animations.TrySetDefaultAnimation( 136 if (m_animations.TrySetDefaultAnimation(
135 anim, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, m_scenePresence.UUID)) 137 anim, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, m_scenePresence.UUID))
136 { 138 {
139// m_log.DebugFormat(
140// "[SCENE PRESENCE ANIMATOR]: Updating movement animation to {0} for {1}",
141// anim, m_scenePresence.Name);
142
137 // 16384 is CHANGED_ANIMATION 143 // 16384 is CHANGED_ANIMATION
138 m_scenePresence.SendScriptEventToAttachments("changed", new Object[] { (int)Changed.ANIMATION}); 144 m_scenePresence.SendScriptEventToAttachments("changed", new Object[] { (int)Changed.ANIMATION});
139 SendAnimPack(); 145 SendAnimPack();