aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-01-18 22:57:09 +0000
committerJustin Clark-Casey (justincc)2013-01-25 23:54:53 +0000
commitaf5a3f2d7392ce6f86ef210c401956ca92cdb8e2 (patch)
tree973e46d4dd45814ac7737617b9bc94e5e1aece7f /OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
parentCheck the existing ScenePresence.ParentPart to make sure we're not trying to ... (diff)
downloadopensim-SC-af5a3f2d7392ce6f86ef210c401956ca92cdb8e2.zip
opensim-SC-af5a3f2d7392ce6f86ef210c401956ca92cdb8e2.tar.gz
opensim-SC-af5a3f2d7392ce6f86ef210c401956ca92cdb8e2.tar.bz2
opensim-SC-af5a3f2d7392ce6f86ef210c401956ca92cdb8e2.tar.xz
Restore previous client AO behaviour by not allowing them to remove the default animation but continue to allow scripts to do so.
This keeps the fix from http://opensimulator.org/mantis/view.php?id=6327 and fixes the behaviour regression in http://opensimulator.org/mantis/view.php?id=6483 Animations may still exhibit different behaviour if both scripts and clients are adjusting animations. A change in the behaviour of client AO to not remove all animations may be a better long term approach.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs14
1 files changed, 11 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
index 8bd3cf9..e92a087 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
@@ -112,7 +112,15 @@ namespace OpenSim.Region.Framework.Scenes.Animation
112 AddAnimation(animID, objectID); 112 AddAnimation(animID, objectID);
113 } 113 }
114 114
115 public void RemoveAnimation(UUID animID) 115 /// <summary>
116 /// Remove the specified animation
117 /// </summary>
118 /// <param name='animID'></param>
119 /// <param name='allowNoDefault'>
120 /// If true, then the default animation can be entirely removed.
121 /// If false, then removing the default animation will reset it to the simulator default (currently STAND).
122 /// </param>
123 public void RemoveAnimation(UUID animID, bool allowNoDefault)
116 { 124 {
117 if (m_scenePresence.IsChildAgent) 125 if (m_scenePresence.IsChildAgent)
118 return; 126 return;
@@ -122,7 +130,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
122 "[SCENE PRESENCE ANIMATOR]: Removing animation {0} {1} for {2}", 130 "[SCENE PRESENCE ANIMATOR]: Removing animation {0} {1} for {2}",
123 GetAnimName(animID), animID, m_scenePresence.Name); 131 GetAnimName(animID), animID, m_scenePresence.Name);
124 132
125 if (m_animations.Remove(animID)) 133 if (m_animations.Remove(animID, allowNoDefault))
126 SendAnimPack(); 134 SendAnimPack();
127 } 135 }
128 136
@@ -138,7 +146,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
138 if (animID == UUID.Zero) 146 if (animID == UUID.Zero)
139 return; 147 return;
140 148
141 RemoveAnimation(animID); 149 RemoveAnimation(animID, true);
142 } 150 }
143 151
144 public void ResetAnimations() 152 public void ResetAnimations()