From af5a3f2d7392ce6f86ef210c401956ca92cdb8e2 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 18 Jan 2013 22:57:09 +0000 Subject: 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. --- OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs') 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 return false; } - public bool Remove(UUID animID) + /// + /// Remove the specified animation + /// + /// + /// + /// If true, then the default animation can be entirely removed. + /// If false, then removing the default animation will reset it to the simulator default (currently STAND). + /// + public bool Remove(UUID animID, bool allowNoDefault) { lock (m_animations) { if (m_defaultAnimation.AnimID == animID) { - m_defaultAnimation = new OpenSim.Framework.Animation(UUID.Zero, 1, UUID.Zero); + if (allowNoDefault) + m_defaultAnimation = new OpenSim.Framework.Animation(UUID.Zero, 1, UUID.Zero); + else + ResetDefaultAnimation(); } else if (HasAnimation(animID)) { -- cgit v1.1