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 ff53f45..bb33f07 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs | |||
@@ -408,13 +408,19 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
408 | { | 408 | { |
409 | lock (m_animations) | 409 | lock (m_animations) |
410 | { | 410 | { |
411 | CurrentMovementAnimation = DetermineMovementAnimation(); | 411 | string newMovementAnimation = DetermineMovementAnimation(); |
412 | if (CurrentMovementAnimation != newMovementAnimation) | ||
413 | { | ||
414 | CurrentMovementAnimation = DetermineMovementAnimation(); | ||
412 | 415 | ||
413 | // m_log.DebugFormat( | 416 | // m_log.DebugFormat( |
414 | // "[SCENE PRESENCE ANIMATOR]: Determined animation {0} for {1} in UpdateMovementAnimations()", | 417 | // "[SCENE PRESENCE ANIMATOR]: Determined animation {0} for {1} in UpdateMovementAnimations()", |
415 | // CurrentMovementAnimation, m_scenePresence.Name); | 418 | // CurrentMovementAnimation, m_scenePresence.Name); |
416 | 419 | ||
417 | TrySetMovementAnimation(CurrentMovementAnimation); | 420 | // Only set it if it's actually changed, give a script |
421 | // a chance to stop a default animation | ||
422 | TrySetMovementAnimation(CurrentMovementAnimation); | ||
423 | } | ||
418 | } | 424 | } |
419 | } | 425 | } |
420 | 426 | ||
@@ -536,4 +542,4 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
536 | SendAnimPack(animIDs, sequenceNums, objectIDs); | 542 | SendAnimPack(animIDs, sequenceNums, objectIDs); |
537 | } | 543 | } |
538 | } | 544 | } |
539 | } \ No newline at end of file | 545 | } |