diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index 5b16b67..d18571c 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | |||
@@ -80,13 +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 | // m_log.DebugFormat("[SCENE PRESENCE ANIMATOR]: Adding animation {0} for {1}", animID, m_scenePresence.Name); |
90 | 90 | ||
91 | if (m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, objectID)) | 91 | if (m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, objectID)) |
92 | SendAnimPack(); | 92 | SendAnimPack(); |
@@ -120,6 +120,22 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
120 | SendAnimPack(); | 120 | SendAnimPack(); |
121 | } | 121 | } |
122 | 122 | ||
123 | public void avnChangeAnim(UUID animID, bool addRemove, bool sendPack) | ||
124 | { | ||
125 | if (m_scenePresence.IsChildAgent) | ||
126 | return; | ||
127 | |||
128 | if (animID != UUID.Zero) | ||
129 | { | ||
130 | if (addRemove) | ||
131 | m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, UUID.Zero); | ||
132 | else | ||
133 | m_animations.Remove(animID); | ||
134 | } | ||
135 | if(sendPack) | ||
136 | SendAnimPack(); | ||
137 | } | ||
138 | |||
123 | // Called from scripts | 139 | // Called from scripts |
124 | public void RemoveAnimation(string name) | 140 | public void RemoveAnimation(string name) |
125 | { | 141 | { |