diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Animation')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index 3b5a5bd..5529a25 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | |||
@@ -80,12 +80,13 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
80 | m_scenePresence = sp; | 80 | m_scenePresence = sp; |
81 | CurrentMovementAnimation = "CROUCH"; | 81 | CurrentMovementAnimation = "CROUCH"; |
82 | } | 82 | } |
83 | 83 | ||
84 | public void AddAnimation(UUID animID, UUID objectID) | 84 | public void AddAnimation(UUID animID, UUID objectID) |
85 | { | 85 | { |
86 | if (m_scenePresence.IsChildAgent) | 86 | if (m_scenePresence.IsChildAgent) |
87 | return; | 87 | return; |
88 | 88 | ||
89 | // m_log.DebugFormat("[SCENE PRESENCE ANIMATOR]: Adding animation {0} for {1}", animID, m_scenePresence.Name); | ||
89 | if (m_scenePresence.Scene.DebugAnimations) | 90 | if (m_scenePresence.Scene.DebugAnimations) |
90 | m_log.DebugFormat( | 91 | m_log.DebugFormat( |
91 | "[SCENE PRESENCE ANIMATOR]: Adding animation {0} {1} for {2}", | 92 | "[SCENE PRESENCE ANIMATOR]: Adding animation {0} {1} for {2}", |
@@ -140,6 +141,22 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
140 | } | 141 | } |
141 | } | 142 | } |
142 | 143 | ||
144 | public void avnChangeAnim(UUID animID, bool addRemove, bool sendPack) | ||
145 | { | ||
146 | if (m_scenePresence.IsChildAgent) | ||
147 | return; | ||
148 | |||
149 | if (animID != UUID.Zero) | ||
150 | { | ||
151 | if (addRemove) | ||
152 | m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, UUID.Zero); | ||
153 | else | ||
154 | m_animations.Remove(animID, true); | ||
155 | } | ||
156 | if(sendPack) | ||
157 | SendAnimPack(); | ||
158 | } | ||
159 | |||
143 | // Called from scripts | 160 | // Called from scripts |
144 | public void RemoveAnimation(string name) | 161 | public void RemoveAnimation(string name) |
145 | { | 162 | { |