Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Separate LSL's notion of the default anim from the actually playing a…

…nims.
  • Loading branch information...
commit 1c5f6e48b80e15f97c8203f3db0df6745c7a2283 1 parent de6f147
Melanie Thielker authored October 26, 2012
6  OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
@@ -41,12 +41,13 @@ public class AnimationSet
41 41
     {
42 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 45
         private OpenSim.Framework.Animation m_defaultAnimation = new OpenSim.Framework.Animation();
45 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 53
         public AnimationSet()
@@ -119,6 +120,7 @@ public bool SetDefaultAnimation(UUID animID, int sequenceNum, UUID objectID)
119 120
             if (m_defaultAnimation.AnimID != animID)
120 121
             {
121 122
                 m_defaultAnimation = new OpenSim.Framework.Animation(animID, sequenceNum, objectID);
  123
+                m_implicitDefaultAnimation = m_defaultAnimation;
122 124
                 return true;
123 125
             }
124 126
             return false;
6  OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4388,7 +4388,7 @@ public LSL_String llGetAnimation(string id)
4388 4388
                 {
4389 4389
                     AnimationSet currentAnims = presence.Animator.Animations;
4390 4390
                     string currentAnimationState = String.Empty;
4391  
-                    if (animationstateNames.TryGetValue(currentAnims.DefaultAnimation.AnimID, out currentAnimationState))
  4391
+                    if (animationstateNames.TryGetValue(currentAnims.ImplicitDefaultAnimation.AnimID, out currentAnimationState))
4392 4392
                         return currentAnimationState;
4393 4393
                 }
4394 4394
             }
@@ -5705,7 +5705,7 @@ public LSL_Integer llGetAgentInfo(string id)
5705 5705
                  flags |= ScriptBaseClass.AGENT_SITTING;
5706 5706
              }
5707 5707
 
5708  
-             if (agent.Animator.Animations.DefaultAnimation.AnimID
  5708
+             if (agent.Animator.Animations.ImplicitDefaultAnimation.AnimID
5709 5709
                 == DefaultAvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
5710 5710
              {
5711 5711
                  flags |= ScriptBaseClass.AGENT_SITTING;
@@ -7892,7 +7892,7 @@ public LSL_List llGetBoundingBox(string obj)
7892 7892
                 {
7893 7893
                     LSL_Vector lower;
7894 7894
                     LSL_Vector upper;
7895  
-                    if (presence.Animator.Animations.DefaultAnimation.AnimID
  7895
+                    if (presence.Animator.Animations.ImplicitDefaultAnimation.AnimID
7896 7896
                         == DefaultAvatarAnimations.AnimsUUID["SIT_GROUND_CONSTRAINED"])
7897 7897
                     {
7898 7898
                         // This is for ground sitting avatars

0 notes on commit 1c5f6e4

Please sign in to comment.
Something went wrong with that request. Please try again.