diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index 9fd5e645d5..bbc5745f98 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs @@ -475,7 +475,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation string newMovementAnimation = DetermineMovementAnimation(); if (CurrentMovementAnimation != newMovementAnimation) { - CurrentMovementAnimation = DetermineMovementAnimation(); + CurrentMovementAnimation = newMovementAnimation; // m_log.DebugFormat( // "[SCENE PRESENCE ANIMATOR]: Determined animation {0} for {1} in UpdateMovementAnimations()", @@ -489,6 +489,19 @@ namespace OpenSim.Region.Framework.Scenes.Animation 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() { UUID[] animIDs; diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index c24a4a288b..5da92f9eaa 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -6040,7 +6040,7 @@ namespace OpenSim.Region.Framework.Scenes { Overrides.SetOverride(animState, animID); // Animator.SendAnimPack(); - Animator.UpdateMovementAnimations(); + Animator.ForceUpdateMovementAnimations(); } public UUID GetAnimationOverride(string animState)