From de6f147d3c2f178b47c4fffddb85925f75e6d88f Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 26 Oct 2012 21:16:27 +0100 Subject: [PATCH 1/2] Revert "Fix for Mantis 0006376: Avatar no longer show Walking animation when any AO hud is" This reverts commit fa484c3494a7190b4d7526094347be74d091e125. --- OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs index 9ed4f47743..ad421eeedb 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs @@ -87,7 +87,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation { if (m_defaultAnimation.AnimID == animID) { - m_defaultAnimation = new OpenSim.Framework.Animation(animID, 1, UUID.Zero); + m_defaultAnimation = new OpenSim.Framework.Animation(UUID.Zero, 1, UUID.Zero); } else if (HasAnimation(animID)) { From 1c5f6e48b80e15f97c8203f3db0df6745c7a2283 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 26 Oct 2012 21:23:20 +0100 Subject: [PATCH 2/2] Separate LSL's notion of the default anim from the actually playing anims. --- OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs | 6 ++++-- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs index ad421eeedb..3d8e8be795 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs @@ -41,12 +41,13 @@ namespace OpenSim.Region.Framework.Scenes.Animation { // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private OpenSim.Framework.Animation m_implicitDefaultAnimation = new OpenSim.Framework.Animation(); private OpenSim.Framework.Animation m_defaultAnimation = new OpenSim.Framework.Animation(); private List m_animations = new List(); - public OpenSim.Framework.Animation DefaultAnimation + public OpenSim.Framework.Animation ImplicitDefaultAnimation { - get { return m_defaultAnimation; } + get { return m_implicitDefaultAnimation; } } public AnimationSet() @@ -119,6 +120,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation if (m_defaultAnimation.AnimID != animID) { m_defaultAnimation = new OpenSim.Framework.Animation(animID, sequenceNum, objectID); + m_implicitDefaultAnimation = m_defaultAnimation; return true; } return false; diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index dc791d39d9..fa57845c7d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -4388,7 +4388,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { AnimationSet currentAnims = presence.Animator.Animations; string currentAnimationState = String.Empty; - if (animationstateNames.TryGetValue(currentAnims.DefaultAnimation.AnimID, out currentAnimationState)) + if (animationstateNames.TryGetValue(currentAnims.ImplicitDefaultAnimation.AnimID, out currentAnimationState)) return currentAnimationState; } } @@ -5705,7 +5705,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api flags |= ScriptBaseClass.AGENT_SITTING; } - if (agent.Animator.Animations.DefaultAnimation.AnimID + if (agent.Animator.Animations.ImplicitDefaultAnimation.AnimID == DefaultAvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"]) { flags |= ScriptBaseClass.AGENT_SITTING; @@ -7892,7 +7892,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { LSL_Vector lower; LSL_Vector upper; - if (presence.Animator.Animations.DefaultAnimation.AnimID + if (presence.Animator.Animations.ImplicitDefaultAnimation.AnimID == DefaultAvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"]) { // This is for ground sitting avatars