force update of movement animation

avinationmerge
UbitUmarov 2014-09-09 22:27:21 +01:00
parent 9d815e2d2a
commit e37fd5e716
2 changed files with 15 additions and 2 deletions

View File

@ -475,7 +475,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
string newMovementAnimation = DetermineMovementAnimation(); string newMovementAnimation = DetermineMovementAnimation();
if (CurrentMovementAnimation != newMovementAnimation) if (CurrentMovementAnimation != newMovementAnimation)
{ {
CurrentMovementAnimation = DetermineMovementAnimation(); CurrentMovementAnimation = newMovementAnimation;
// m_log.DebugFormat( // m_log.DebugFormat(
// "[SCENE PRESENCE ANIMATOR]: Determined animation {0} for {1} in UpdateMovementAnimations()", // "[SCENE PRESENCE ANIMATOR]: Determined animation {0} for {1} in UpdateMovementAnimations()",
@ -489,6 +489,19 @@ namespace OpenSim.Region.Framework.Scenes.Animation
return ret; return ret;
} }
public bool ForceUpdateMovementAnimations()
{
// m_log.DebugFormat("[SCENE PRESENCE ANIMATOR]: Updating movement animations for {0}", m_scenePresence.Name);
bool ret = false;
lock (m_animations)
{
string newMovementAnimation = DetermineMovementAnimation();
ret = TrySetMovementAnimation(newMovementAnimation);
}
return ret;
}
public UUID[] GetAnimationArray() public UUID[] GetAnimationArray()
{ {
UUID[] animIDs; UUID[] animIDs;

View File

@ -6040,7 +6040,7 @@ namespace OpenSim.Region.Framework.Scenes
{ {
Overrides.SetOverride(animState, animID); Overrides.SetOverride(animState, animID);
// Animator.SendAnimPack(); // Animator.SendAnimPack();
Animator.UpdateMovementAnimations(); Animator.ForceUpdateMovementAnimations();
} }
public UUID GetAnimationOverride(string animState) public UUID GetAnimationOverride(string animState)