Permalink
Browse files

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

…nims.
  • Loading branch information...
1 parent de6f147 commit 1c5f6e48b80e15f97c8203f3db0df6745c7a2283 @MelanieT MelanieT committed Oct 26, 2012
@@ -41,12 +41,13 @@ public class AnimationSet
{
// 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<OpenSim.Framework.Animation> m_animations = new List<OpenSim.Framework.Animation>();
- public OpenSim.Framework.Animation DefaultAnimation
+ public OpenSim.Framework.Animation ImplicitDefaultAnimation
{
- get { return m_defaultAnimation; }
+ get { return m_implicitDefaultAnimation; }
}
public AnimationSet()
@@ -119,6 +120,7 @@ public bool SetDefaultAnimation(UUID animID, int sequenceNum, UUID objectID)
if (m_defaultAnimation.AnimID != animID)
{
m_defaultAnimation = new OpenSim.Framework.Animation(animID, sequenceNum, objectID);
+ m_implicitDefaultAnimation = m_defaultAnimation;
return true;
}
return false;
@@ -4388,7 +4388,7 @@ public LSL_String llGetAnimation(string id)
{
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 @@ public LSL_Integer llGetAgentInfo(string id)
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 @@ public LSL_List llGetBoundingBox(string obj)
{
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

0 comments on commit 1c5f6e4

Please sign in to comment.