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 e92a087..65c279e 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}", |
@@ -134,6 +135,22 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
134 | SendAnimPack(); | 135 | SendAnimPack(); |
135 | } | 136 | } |
136 | 137 | ||
138 | public void avnChangeAnim(UUID animID, bool addRemove, bool sendPack) | ||
139 | { | ||
140 | if (m_scenePresence.IsChildAgent) | ||
141 | return; | ||
142 | |||
143 | if (animID != UUID.Zero) | ||
144 | { | ||
145 | if (addRemove) | ||
146 | m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, UUID.Zero); | ||
147 | else | ||
148 | m_animations.Remove(animID, true); | ||
149 | } | ||
150 | if(sendPack) | ||
151 | SendAnimPack(); | ||
152 | } | ||
153 | |||
137 | // Called from scripts | 154 | // Called from scripts |
138 | public void RemoveAnimation(string name) | 155 | public void RemoveAnimation(string name) |
139 | { | 156 | { |