mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
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.
This commit is contained in:
@@ -87,13 +87,24 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool Remove(UUID animID)
|
||||
/// <summary>
|
||||
/// Remove the specified animation
|
||||
/// </summary>
|
||||
/// <param name='animID'></param>
|
||||
/// <param name='allowNoDefault'>
|
||||
/// 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).
|
||||
/// </param>
|
||||
public bool Remove(UUID animID, bool allowNoDefault)
|
||||
{
|
||||
lock (m_animations)
|
||||
{
|
||||
if (m_defaultAnimation.AnimID == animID)
|
||||
{
|
||||
m_defaultAnimation = new OpenSim.Framework.Animation(UUID.Zero, 1, UUID.Zero);
|
||||
if (allowNoDefault)
|
||||
m_defaultAnimation = new OpenSim.Framework.Animation(UUID.Zero, 1, UUID.Zero);
|
||||
else
|
||||
ResetDefaultAnimation();
|
||||
}
|
||||
else if (HasAnimation(animID))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user