aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.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/AnimationSet.cs
parentCheck the existing ScenePresence.ParentPart to make sure we're not trying to ... (diff)
downloadopensim-SC_OLD-af5a3f2d7392ce6f86ef210c401956ca92cdb8e2.zip
opensim-SC_OLD-af5a3f2d7392ce6f86ef210c401956ca92cdb8e2.tar.gz
opensim-SC_OLD-af5a3f2d7392ce6f86ef210c401956ca92cdb8e2.tar.bz2
opensim-SC_OLD-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/AnimationSet.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs15
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
index 65ae445..66edfed 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
@@ -87,13 +87,24 @@ namespace OpenSim.Region.Framework.Scenes.Animation
87 return false; 87 return false;
88 } 88 }
89 89
90 public bool Remove(UUID animID) 90 /// <summary>
91 /// Remove the specified animation
92 /// </summary>
93 /// <param name='animID'></param>
94 /// <param name='allowNoDefault'>
95 /// If true, then the default animation can be entirely removed.
96 /// If false, then removing the default animation will reset it to the simulator default (currently STAND).
97 /// </param>
98 public bool Remove(UUID animID, bool allowNoDefault)
91 { 99 {
92 lock (m_animations) 100 lock (m_animations)
93 { 101 {
94 if (m_defaultAnimation.AnimID == animID) 102 if (m_defaultAnimation.AnimID == animID)
95 { 103 {
96 m_defaultAnimation = new OpenSim.Framework.Animation(UUID.Zero, 1, UUID.Zero); 104 if (allowNoDefault)
105 m_defaultAnimation = new OpenSim.Framework.Animation(UUID.Zero, 1, UUID.Zero);
106 else
107 ResetDefaultAnimation();
97 } 108 }
98 else if (HasAnimation(animID)) 109 else if (HasAnimation(animID))
99 { 110 {