diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs index 50a176b..9458079 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | |||
@@ -424,13 +424,19 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
424 | { | 424 | { |
425 | lock (m_animations) | 425 | lock (m_animations) |
426 | { | 426 | { |
427 | CurrentMovementAnimation = DetermineMovementAnimation(); | 427 | string newMovementAnimation = DetermineMovementAnimation(); |
428 | if (CurrentMovementAnimation != newMovementAnimation) | ||
429 | { | ||
430 | CurrentMovementAnimation = DetermineMovementAnimation(); | ||
428 | 431 | ||
429 | // m_log.DebugFormat( | 432 | // m_log.DebugFormat( |
430 | // "[SCENE PRESENCE ANIMATOR]: Determined animation {0} for {1} in UpdateMovementAnimations()", | 433 | // "[SCENE PRESENCE ANIMATOR]: Determined animation {0} for {1} in UpdateMovementAnimations()", |
431 | // CurrentMovementAnimation, m_scenePresence.Name); | 434 | // CurrentMovementAnimation, m_scenePresence.Name); |
432 | 435 | ||
433 | TrySetMovementAnimation(CurrentMovementAnimation); | 436 | // Only set it if it's actually changed, give a script |
437 | // a chance to stop a default animation | ||
438 | TrySetMovementAnimation(CurrentMovementAnimation); | ||
439 | } | ||
434 | } | 440 | } |
435 | } | 441 | } |
436 | 442 | ||
@@ -552,4 +558,4 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
552 | SendAnimPack(animIDs, sequenceNums, objectIDs); | 558 | SendAnimPack(animIDs, sequenceNums, objectIDs); |
553 | } | 559 | } |
554 | } | 560 | } |
555 | } \ No newline at end of file | 561 | } |