From 5561333668f61f043cdfc0733a4eb50a1bcfb14e Mon Sep 17 00:00:00 2001
From: Melanie
Date: Tue, 8 Jan 2013 23:01:09 +0100
Subject: Prevent empty Anim Packs
---
OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs | 12 ++++++++++++
1 file changed, 12 insertions(+)
(limited to 'OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs')
diff --git a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
index 65ae445..d2fc7f1 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
@@ -164,7 +164,13 @@ namespace OpenSim.Region.Framework.Scenes.Animation
{
int defaultSize = 0;
if (m_defaultAnimation.AnimID != UUID.Zero)
+ {
+ defaultSize++;
+ }
+ else if (m_animations.Count == 0)
+ {
defaultSize++;
+ }
animIDs = new UUID[m_animations.Count + defaultSize];
sequenceNums = new int[m_animations.Count + defaultSize];
@@ -176,6 +182,12 @@ namespace OpenSim.Region.Framework.Scenes.Animation
sequenceNums[0] = m_defaultAnimation.SequenceNum;
objectIDs[0] = m_defaultAnimation.ObjectID;
}
+ else if (m_animations.Count == 0)
+ {
+ animIDs[0] = m_implicitDefaultAnimation.AnimID;
+ sequenceNums[0] = m_defaultAnimation.SequenceNum;
+ objectIDs[0] = m_implicitDefaultAnimation.ObjectID;
+ }
for (int i = 0; i < m_animations.Count; ++i)
{
--
cgit v1.1
From a775931a0cec9f65748c6e20dd2695edcbe21b7f Mon Sep 17 00:00:00 2001
From: Melanie
Date: Tue, 8 Jan 2013 23:24:34 +0100
Subject: Fix sequence id fr default anim
---
OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs')
diff --git a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
index d2fc7f1..64c31f8 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
@@ -185,7 +185,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
else if (m_animations.Count == 0)
{
animIDs[0] = m_implicitDefaultAnimation.AnimID;
- sequenceNums[0] = m_defaultAnimation.SequenceNum;
+ sequenceNums[0] = m_implicitDefaultAnimation.SequenceNum;
objectIDs[0] = m_implicitDefaultAnimation.ObjectID;
}
--
cgit v1.1
From c1c540f454b0c9fd189ed768764fb8a51ee773c6 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Wed, 9 Jan 2013 00:20:14 +0000
Subject: Revert "Fix sequence id fr default anim"
This reverts commit a775931a0cec9f65748c6e20dd2695edcbe21b7f.
---
OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs')
diff --git a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
index 64c31f8..d2fc7f1 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
@@ -185,7 +185,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
else if (m_animations.Count == 0)
{
animIDs[0] = m_implicitDefaultAnimation.AnimID;
- sequenceNums[0] = m_implicitDefaultAnimation.SequenceNum;
+ sequenceNums[0] = m_defaultAnimation.SequenceNum;
objectIDs[0] = m_implicitDefaultAnimation.ObjectID;
}
--
cgit v1.1
From f16c4a254c263a7fd75799fe79da6b3d0a1c80a2 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Wed, 9 Jan 2013 00:20:24 +0000
Subject: Revert "Prevent empty Anim Packs"
This reverts commit 5561333668f61f043cdfc0733a4eb50a1bcfb14e.
---
OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs | 12 ------------
1 file changed, 12 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs')
diff --git a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
index d2fc7f1..65ae445 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
@@ -164,13 +164,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
{
int defaultSize = 0;
if (m_defaultAnimation.AnimID != UUID.Zero)
- {
- defaultSize++;
- }
- else if (m_animations.Count == 0)
- {
defaultSize++;
- }
animIDs = new UUID[m_animations.Count + defaultSize];
sequenceNums = new int[m_animations.Count + defaultSize];
@@ -182,12 +176,6 @@ namespace OpenSim.Region.Framework.Scenes.Animation
sequenceNums[0] = m_defaultAnimation.SequenceNum;
objectIDs[0] = m_defaultAnimation.ObjectID;
}
- else if (m_animations.Count == 0)
- {
- animIDs[0] = m_implicitDefaultAnimation.AnimID;
- sequenceNums[0] = m_defaultAnimation.SequenceNum;
- objectIDs[0] = m_implicitDefaultAnimation.ObjectID;
- }
for (int i = 0; i < m_animations.Count; ++i)
{
--
cgit v1.1
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.
---
OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs')
diff --git a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
index 65ae445..66edfed 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
@@ -87,13 +87,24 @@ namespace OpenSim.Region.Framework.Scenes.Animation
return false;
}
- public bool Remove(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 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))
{
--
cgit v1.1