aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Animation
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Animation')
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs33
1 files changed, 28 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
index 3657dc4..e92a087 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
@@ -86,7 +86,10 @@ namespace OpenSim.Region.Framework.Scenes.Animation
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 m_log.DebugFormat(
91 "[SCENE PRESENCE ANIMATOR]: Adding animation {0} {1} for {2}",
92 GetAnimName(animID), animID, m_scenePresence.Name);
90 93
91 if (m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, objectID)) 94 if (m_animations.Add(animID, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, objectID))
92 SendAnimPack(); 95 SendAnimPack();
@@ -122,7 +125,10 @@ namespace OpenSim.Region.Framework.Scenes.Animation
122 if (m_scenePresence.IsChildAgent) 125 if (m_scenePresence.IsChildAgent)
123 return; 126 return;
124 127
125// m_log.DebugFormat("[SCENE PRESENCE ANIMATOR]: Removing animation {0} for {1}", animID, m_scenePresence.Name); 128 if (m_scenePresence.Scene.DebugAnimations)
129 m_log.DebugFormat(
130 "[SCENE PRESENCE ANIMATOR]: Removing animation {0} {1} for {2}",
131 GetAnimName(animID), animID, m_scenePresence.Name);
126 132
127 if (m_animations.Remove(animID, allowNoDefault)) 133 if (m_animations.Remove(animID, allowNoDefault))
128 SendAnimPack(); 134 SendAnimPack();
@@ -145,9 +151,10 @@ namespace OpenSim.Region.Framework.Scenes.Animation
145 151
146 public void ResetAnimations() 152 public void ResetAnimations()
147 { 153 {
148// m_log.DebugFormat( 154 if (m_scenePresence.Scene.DebugAnimations)
149// "[SCENE PRESENCE ANIMATOR]: Resetting animations for {0} in {1}", 155 m_log.DebugFormat(
150// m_scenePresence.Name, m_scenePresence.Scene.RegionInfo.RegionName); 156 "[SCENE PRESENCE ANIMATOR]: Resetting animations for {0} in {1}",
157 m_scenePresence.Name, m_scenePresence.Scene.RegionInfo.RegionName);
151 158
152 m_animations.Clear(); 159 m_animations.Clear();
153 } 160 }
@@ -558,5 +565,21 @@ namespace OpenSim.Region.Framework.Scenes.Animation
558 565
559 SendAnimPack(animIDs, sequenceNums, objectIDs); 566 SendAnimPack(animIDs, sequenceNums, objectIDs);
560 } 567 }
568
569 public string GetAnimName(UUID animId)
570 {
571 string animName;
572
573 if (!DefaultAvatarAnimations.AnimsNames.TryGetValue(animId, out animName))
574 {
575 AssetMetadata amd = m_scenePresence.Scene.AssetService.GetMetadata(animId.ToString());
576 if (amd != null)
577 animName = amd.Name;
578 else
579 animName = "Unknown";
580 }
581
582 return animName;
583 }
561 } 584 }
562} 585}