aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie2012-10-26 21:23:20 +0100
committerMelanie2012-10-26 21:23:20 +0100
commit1c5f6e48b80e15f97c8203f3db0df6745c7a2283 (patch)
tree8e79a3ab78491cbb87b2e7c9ee2f634fe7c0db9d /OpenSim/Region
parentRevert "Fix for Mantis 0006376: Avatar no longer show Walking animation when ... (diff)
downloadopensim-SC_OLD-1c5f6e48b80e15f97c8203f3db0df6745c7a2283.zip
opensim-SC_OLD-1c5f6e48b80e15f97c8203f3db0df6745c7a2283.tar.gz
opensim-SC_OLD-1c5f6e48b80e15f97c8203f3db0df6745c7a2283.tar.bz2
opensim-SC_OLD-1c5f6e48b80e15f97c8203f3db0df6745c7a2283.tar.xz
Separate LSL's notion of the default anim from the actually playing anims.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs6
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 ad421ee..3d8e8be 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
41 { 41 {
42// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43 43
44 private OpenSim.Framework.Animation m_implicitDefaultAnimation = new OpenSim.Framework.Animation();
44 private OpenSim.Framework.Animation m_defaultAnimation = new OpenSim.Framework.Animation(); 45 private OpenSim.Framework.Animation m_defaultAnimation = new OpenSim.Framework.Animation();
45 private List<OpenSim.Framework.Animation> m_animations = new List<OpenSim.Framework.Animation>(); 46 private List<OpenSim.Framework.Animation> m_animations = new List<OpenSim.Framework.Animation>();
46 47
47 public OpenSim.Framework.Animation DefaultAnimation 48 public OpenSim.Framework.Animation ImplicitDefaultAnimation
48 { 49 {
49 get { return m_defaultAnimation; } 50 get { return m_implicitDefaultAnimation; }
50 } 51 }
51 52
52 public AnimationSet() 53 public AnimationSet()
@@ -119,6 +120,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
119 if (m_defaultAnimation.AnimID != animID) 120 if (m_defaultAnimation.AnimID != animID)
120 { 121 {
121 m_defaultAnimation = new OpenSim.Framework.Animation(animID, sequenceNum, objectID); 122 m_defaultAnimation = new OpenSim.Framework.Animation(animID, sequenceNum, objectID);
123 m_implicitDefaultAnimation = m_defaultAnimation;
122 return true; 124 return true;
123 } 125 }
124 return false; 126 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 dc791d3..fa57845 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
4388 { 4388 {
4389 AnimationSet currentAnims = presence.Animator.Animations; 4389 AnimationSet currentAnims = presence.Animator.Animations;
4390 string currentAnimationState = String.Empty; 4390 string currentAnimationState = String.Empty;
4391 if (animationstateNames.TryGetValue(currentAnims.DefaultAnimation.AnimID, out currentAnimationState)) 4391 if (animationstateNames.TryGetValue(currentAnims.ImplicitDefaultAnimation.AnimID, out currentAnimationState))
4392 return currentAnimationState; 4392 return currentAnimationState;
4393 } 4393 }
4394 } 4394 }
@@ -5705,7 +5705,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5705 flags |= ScriptBaseClass.AGENT_SITTING; 5705 flags |= ScriptBaseClass.AGENT_SITTING;
5706 } 5706 }
5707 5707
5708 if (agent.Animator.Animations.DefaultAnimation.AnimID 5708 if (agent.Animator.Animations.ImplicitDefaultAnimation.AnimID
5709 == DefaultAvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"]) 5709 == DefaultAvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
5710 { 5710 {
5711 flags |= ScriptBaseClass.AGENT_SITTING; 5711 flags |= ScriptBaseClass.AGENT_SITTING;
@@ -7892,7 +7892,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7892 { 7892 {
7893 LSL_Vector lower; 7893 LSL_Vector lower;
7894 LSL_Vector upper; 7894 LSL_Vector upper;
7895 if (presence.Animator.Animations.DefaultAnimation.AnimID 7895 if (presence.Animator.Animations.ImplicitDefaultAnimation.AnimID
7896 == DefaultAvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"]) 7896 == DefaultAvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
7897 { 7897 {
7898 // This is for ground sitting avatars 7898 // This is for ground sitting avatars