Separate LSL's notion of the default anim from the actually playing anims.
parent
de6f147d3c
commit
1c5f6e48b8
|
@ -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<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 @@ 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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue