From 74256c0cc47870f6057b64ce117479af79f02ab0 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 18 Jan 2013 22:57:09 +0000
Subject: Restore previous client AO behaviour by not allowing them to remove
the default animation but continue to allow scripts to do so.
This keeps the fix from http://opensimulator.org/mantis/view.php?id=6327
and fixes the behaviour regression in http://opensimulator.org/mantis/view.php?id=6483
Animations may still exhibit different behaviour if both scripts and clients are adjusting animations.
A change in the behaviour of client AO to not remove all animations may be a better long term approach.
---
.../Framework/Scenes/Animation/ScenePresenceAnimator.cs | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs')
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
index 5b16b67..3657dc4 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
@@ -109,14 +109,22 @@ namespace OpenSim.Region.Framework.Scenes.Animation
AddAnimation(animID, objectID);
}
- public void RemoveAnimation(UUID animID)
+ ///
+ /// Remove the specified animation
+ ///
+ ///
+ ///
+ /// If true, then the default animation can be entirely removed.
+ /// If false, then removing the default animation will reset it to the simulator default (currently STAND).
+ ///
+ public void RemoveAnimation(UUID animID, bool allowNoDefault)
{
if (m_scenePresence.IsChildAgent)
return;
// m_log.DebugFormat("[SCENE PRESENCE ANIMATOR]: Removing animation {0} for {1}", animID, m_scenePresence.Name);
- if (m_animations.Remove(animID))
+ if (m_animations.Remove(animID, allowNoDefault))
SendAnimPack();
}
@@ -132,7 +140,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
if (animID == UUID.Zero)
return;
- RemoveAnimation(animID);
+ RemoveAnimation(animID, true);
}
public void ResetAnimations()
--
cgit v1.1